particle.h 590 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * 2D Physic Engine
  3. * particle.h:
  4. * Based on pikuma.com Learn Game Physics Engine Programming course.
  5. * Copyright (c) 2022 986-Studio. All rights reserved.
  6. *
  7. * Created by Manoël Trapier on 07/06/2022.
  8. */
  9. #ifndef PHYSICENGINE_PHYSICS_PARTICLE_H
  10. #define PHYSICENGINE_PHYSICS_PARTICLE_H
  11. #include <physics/vec2.h>
  12. class particle
  13. {
  14. public:
  15. vec2 position;
  16. vec2 acceleration;
  17. vec2 velocity;
  18. double mass;
  19. public:
  20. particle(double x, double y, double mass): position(x, y), mass(mass) {};
  21. ~particle() = default;
  22. };
  23. #endif /* PHYSICENGINE_PHYSICS_PARTICLE_H */