forked from rpbpolis/spic-prj-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RigidBody.hpp
39 lines (32 loc) · 860 Bytes
/
RigidBody.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef RIGIDBODY_H_
#define RIGIDBODY_H_
#include "Component.hpp"
#include "Point.hpp"
namespace spic {
/**
* @brief Enumeration for different rigid body types
*/
enum class BodyType {
staticBody,
kinematicBody,
dynamicBody
};
/**
* @brief A component representing a rigid body.
*/
class RigidBody : public Component {
public:
/**
* @brief Apply force to this rigid body.
* @param forceDirection A point, used as a vector to indicate direction
* and magnitude of the force to be applied.
* @spicapi
*/
void AddForce(const Point& forceDirection);
private:
double mass;
double gravityScale;
BodyType bodyType;
};
}
#endif // RIGIDBODY_H_