123456789101112131415161718192021222324252627282930313233 |
- /*
- * 2D Physic Engine
- * particle.h:
- * Based on pikuma.com Learn Game Physics Engine Programming course.
- * Copyright (c) 2022 986-Studio. All rights reserved.
- *
- * Created by Manoël Trapier on 07/06/2022.
- */
- #ifndef PHYSICENGINE_PHYSICS_PARTICLE_H
- #define PHYSICENGINE_PHYSICS_PARTICLE_H
- #include <physics/vec2.h>
- class particle
- {
- public:
- uint16_t radius;
- vec2 position;
- vec2 acceleration;
- vec2 velocity;
- double mass;
- public:
- particle(double x, double y, double mass): radius(4), position(x, y), mass(mass) {};
- ~particle() = default;
- void integrate(double dt);
- };
- #endif /* PHYSICENGINE_PHYSICS_PARTICLE_H */
|