diff options
author | Hans Lambermont <hans@lambermont.dyndns.org> | 2002-10-12 15:37:38 +0400 |
---|---|---|
committer | Hans Lambermont <hans@lambermont.dyndns.org> | 2002-10-12 15:37:38 +0400 |
commit | 12315f4d0e0ae993805f141f64cb8c73c5297311 (patch) | |
tree | 59b45827cd8293cfb727758989c7a74b40183974 /source/gameengine/Physics/Sumo/Fuzzics/include/SM_MotionState.h |
Initial revisionv2.25
Diffstat (limited to 'source/gameengine/Physics/Sumo/Fuzzics/include/SM_MotionState.h')
-rw-r--r-- | source/gameengine/Physics/Sumo/Fuzzics/include/SM_MotionState.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/include/SM_MotionState.h b/source/gameengine/Physics/Sumo/Fuzzics/include/SM_MotionState.h new file mode 100644 index 00000000000..9c6a9ddaec2 --- /dev/null +++ b/source/gameengine/Physics/Sumo/Fuzzics/include/SM_MotionState.h @@ -0,0 +1,36 @@ +#ifndef SM_MOTIONSTATE_H +#define SM_MOTIONSTATE_H + +#include "MT_Transform.h" + +class SM_MotionState { +public: + SM_MotionState() : + m_pos(0.0, 0.0, 0.0), + m_orn(0.0, 0.0, 0.0, 1.0), + m_lin_vel(0.0, 0.0, 0.0), + m_ang_vel(0.0, 0.0, 0.0) + {} + + void setPosition(const MT_Point3& pos) { m_pos = pos; } + void setOrientation(const MT_Quaternion& orn) { m_orn = orn; } + void setLinearVelocity(const MT_Vector3& lin_vel) { m_lin_vel = lin_vel; } + void setAngularVelocity(const MT_Vector3& ang_vel) { m_ang_vel = ang_vel; } + + const MT_Point3& getPosition() const { return m_pos; } + const MT_Quaternion& getOrientation() const { return m_orn; } + const MT_Vector3& getLinearVelocity() const { return m_lin_vel; } + const MT_Vector3& getAngularVelocity() const { return m_ang_vel; } + + virtual MT_Transform getTransform() const { + return MT_Transform(m_pos, m_orn); + } + +protected: + MT_Point3 m_pos; + MT_Quaternion m_orn; + MT_Vector3 m_lin_vel; + MT_Vector3 m_ang_vel; +}; + +#endif |