7 #ifndef CAFU_GAMESYS_COMPONENT_PHYSICS_HPP_INCLUDED
8 #define CAFU_GAMESYS_COMPONENT_PHYSICS_HPP_INCLUDED
10 #include "CompBase.hpp"
11 #include "btBulletDynamicsCommon.h"
40 float GetMass()
const {
return m_Mass.
Get(); }
41 const btRigidBody* GetRigidBody()
const {
return m_RigidBody; }
46 const char*
GetName()
const {
return "Physics"; }
59 static int ApplyImpulse(lua_State* LuaState);
60 static int SetGravity(lua_State* LuaState);
61 static int toString(lua_State* LuaState);
64 static const char* DocClass;
72 void getWorldTransform(btTransform& worldTrans)
const;
73 void setWorldTransform(
const btTransform& worldTrans);
77 btCollisionShape* m_CollisionShape;
78 btRigidBody* m_RigidBody;
ComponentPhysicsT * Clone() const
The virtual copy constructor.
Definition: CompPhysics.cpp:80
void UpdateDependencies(EntityT *Entity)
This method is called whenever something "external" to this component has changed: ...
Definition: CompPhysics.cpp:101
This class represents game entities, which are the basic elements of a world.
Definition: Entity.hpp:53
~ComponentPhysicsT()
The destructor.
Definition: CompPhysics.cpp:64
ComponentPhysicsT()
The constructor.
Definition: CompPhysics.cpp:44
This component includes the body of this entity in the dynamic simulation of physics.
Definition: CompPhysics.hpp:26
static const luaL_Reg MethodsList[]
The list of Lua methods for this class.
Definition: CompPhysics.hpp:63
Definition: TypeSys.hpp:52
Definition: TypeSys.hpp:57
const char * GetName() const
Returns the name of this component.
Definition: CompPhysics.hpp:46
This class keeps type information (about an entity class that occurs in the game).
Definition: TypeSys.hpp:79
const T & Get() const
Returns the value of this variable.
Definition: Variables.hpp:182
Definition: TypeSys.hpp:68
This is the base class for the components that an entity is composed/aggregated of.
Definition: CompBase.hpp:54