|
Thrive
|
A component for a rigid body. More...
#include <rigid_body_system.h>
Classes | |
| struct | DynamicProperties |
| Dynamic properties (those the physics engine changes) More... | |
| struct | Properties |
| Properties. More... | |
Public Member Functions | |
| RigidBodyComponent (short int collisionFilterGroup=btBroadphaseProxy::DefaultFilter, short int collisionFilterMask=btBroadphaseProxy::AllFilter) | |
| Constructor. More... | |
| void | applyCentralImpulse (const Ogre::Vector3 &impulse) |
| Applies an impulse to the center of mass. More... | |
| void | applyImpulse (const Ogre::Vector3 &impulse, const Ogre::Vector3 &relativePosition) |
| Applies an impulse. More... | |
| void | applyTorque (const Ogre::Vector3 &torque) |
| Applies a torque to the body. More... | |
| void | clearForces () |
| Clears forces acting upon the body. | |
| void | disableCollisionsWith (EntityId other) |
| This disables collisions with another entity. More... | |
| void | reenableAllCollisions () |
| Reenables all collisions previously disabled. | |
| void | getWorldTransform (btTransform &transform) const override |
| Reimplemented from btMotionState. More... | |
| void | load (const StorageContainer &storage) override |
| Loads the component. More... | |
| void | setWorldTransform (const btTransform &transform) override |
| Reimplemented from btMotionState. More... | |
| void | setDynamicProperties (const Ogre::Vector3 &position, const Ogre::Quaternion &orientation, const Ogre::Vector3 &linearVelocity, const Ogre::Vector3 &angularVelocity) |
| Overrides the physics engine. More... | |
| StorageContainer | storage () const override |
| Serializes the component. More... | |
Public Member Functions inherited from thrive::Component | |
| virtual | ~Component ()=0 |
| Destructor. | |
| bool | isVolatile () const |
| A volatile component is not serialized during a save. More... | |
| EntityId | owner () const |
| The entity this component belongs to. More... | |
| void | setVolatile (bool isVolatile) |
| Sets the volatile flag. More... | |
| void | setOwner (EntityId owner) |
| Sets the component's owner. More... | |
| virtual ComponentTypeId | typeId () const =0 |
| The component's type id. | |
| virtual std::string | typeName () const =0 |
| The component's type name. | |
Static Public Member Functions | |
| static luabind::scope | luaBindings () |
| Lua bindings. More... | |
Static Public Member Functions inherited from thrive::Component | |
| static luabind::scope | luaBindings () |
| Lua bindings. More... | |
Public Attributes | |
| btRigidBody * | m_body = nullptr |
| Internal object, dont use this directly. | |
| const short int | m_collisionFilterGroup |
| The body's collision group. | |
| const short int | m_collisionFilterMask |
| The groups this body can collide with. | |
| DynamicProperties | m_dynamicProperties |
| Dynamic properties. | |
| std::list< std::pair< Ogre::Vector3, Ogre::Vector3 > > | m_impulseQueue |
| Queue of impulses since the last frame. | |
| Ogre::Vector3 | m_torque = Ogre::Vector3::ZERO |
| The torque that has been applied in this timestep. | |
| Properties | m_properties |
| Properties. | |
| EntityId | m_pushbackEntity = NULL_ENTITY |
| float | m_pushbackAngle = 0 |
Friends | |
| class | RigidBodyInputSystem |
A component for a rigid body.
|
inline |
Constructor.
| collisionFilterGroup | The collision group this body belongs to |
| collisionFilterMask | The groups this body can collide with |
| void RigidBodyComponent::applyCentralImpulse | ( | const Ogre::Vector3 & | impulse | ) |
Applies an impulse to the center of mass.
| impulse | The impulse |
| void RigidBodyComponent::applyImpulse | ( | const Ogre::Vector3 & | impulse, |
| const Ogre::Vector3 & | relativePosition | ||
| ) |
Applies an impulse.
| impulse | The impulse |
| relativePosition | The attack point, relative to the center of mass |
| void RigidBodyComponent::applyTorque | ( | const Ogre::Vector3 & | torque | ) |
Applies a torque to the body.
| torque | The torque to apply |
| void RigidBodyComponent::disableCollisionsWith | ( | EntityId | other | ) |
This disables collisions with another entity.
| other | The entity to nocollide with |
|
override |
Reimplemented from btMotionState.
| [out] | transform | The rigid body's position and orientation |
|
overridevirtual |
|
static |
Lua bindings.
Exposes:
| void RigidBodyComponent::setDynamicProperties | ( | const Ogre::Vector3 & | position, |
| const Ogre::Quaternion & | orientation, | ||
| const Ogre::Vector3 & | linearVelocity, | ||
| const Ogre::Vector3 & | angularVelocity | ||
| ) |
Overrides the physics engine.
| position | New position |
| orientation | New orientation |
| linearVelocity | New velocity |
| angularVelocity | New rotation |
|
override |
Reimplemented from btMotionState.
| transform | The rigid body's position and orientation |
|
overridevirtual |
1.8.10