#include <CBulletGenericObject.h>

Public Member Functions | |
| cBulletGenericObject (cBulletWorld *a_world) | |
| Constructor of cBulletGenericBody. More... | |
| virtual | ~cBulletGenericObject () |
| Destructor of cBulletGenericBody. More... | |
| virtual void | updateBodyPosition (void) |
| This method updates the position and orientation from the Bullet model to CHAI3D model. More... | |
| virtual void | setMass (const double a_mass) |
| This method assigns a mass value to this object. More... | |
| double | getMass () const |
| This method returns the mass value for this object. More... | |
| virtual void | setInertia (const cVector3d &a_inertia) |
| This method assigns an inertia properties to this object. More... | |
| cVector3d | getInertia () |
| This method returns the inertia properties of this object. More... | |
| virtual void | setMassInertia (const double a_mass, const cVector3d &a_inertia) |
| This method assigns a mass and an inertia to this object. More... | |
| virtual void | estimateInertia () |
| This method estimates the inertia properties for this object. More... | |
| virtual void | setStatic (bool a_static) |
| This method enables of disables the object to be static in the world. More... | |
| virtual bool | getStatic () const |
| This method returns true if the object is static, false otherwise. More... | |
| virtual void | buildDynamicModel () |
| This method builds a dynamic representation of the object in the Bullet world. More... | |
| virtual void | updatePositionFromDynamics () |
| This method updates the CHAI3D position representation from the Bullet dynamics engine. More... | |
| void | setSurfaceFriction (const double a_friction) |
| This method assign a coefficient of friction to this object. More... | |
| double | getSurfaceFriction () |
| This method returns the coefficient of friction for this object. More... | |
| void | addExternalForce (const cVector3d &a_force) |
| This method applies an external force at the center of mass of this object. More... | |
| void | addExternalTorque (const cVector3d &a_torque) |
| This method applies an external torque at the center of mass of of this object. More... | |
| void | addExternalForceAtPoint (const cVector3d &a_force, const cVector3d &a_relativePos) |
| This method applies an external force at a given position described in global coordinates to this object. More... | |
| void | setDamping (const double &a_dampingLin, const double &a_dampingAng) |
| This method assigns a linear and angular damping term to the object. More... | |
| double | getDampingLin () |
| This method returns the linear damping term for this object. More... | |
| double | getDampingAng () |
| This method returns the angular damping term for this object. More... | |
Public Attributes | |
| cBulletWorld * | m_dynamicWorld |
| Bullet world. More... | |
| btRigidBody * | m_bulletRigidBody |
| Bullet rigid body. More... | |
| btCollisionShape * | m_bulletCollisionShape |
| Bullet collision shape. More... | |
| btDefaultMotionState * | m_bulletMotionState |
| Bullet motion state. More... | |
Protected Member Functions | |
| virtual void | initialize (cBulletWorld *a_world) |
| This method initializes the Bullet object. More... | |
Protected Attributes | |
| bool | m_static |
| If true then object is static and does not move, false otherwise. More... | |
| double | m_mass |
| Mass property. More... | |
| cVector3d | m_inertia |
| Inertia properties. More... | |
|
inline |
|
virtual |
This method initializes the Bullet dynamic model.
|
inlinevirtual |
|
virtual |
This method assigns a mass value to this object.
| a_mass | Mass value. |
|
inline |
|
virtual |
This method assigns inertia properties to this object.
| a_inertia | Inertia properties. |
|
inline |
|
virtual |
This method assigns mass and inertia properties to this object.
| a_mass | Mass value. |
| a_inertia | Inertia properties. |
|
virtual |
This method estimates the inertia properties for this object. Make sure to define its mass beforehand.
|
virtual |
This method enables of disables the object to be static in the world.
| a_static | If true then object is static, false it is dynamic as long as mass and inertia properties have been defined. |
|
inlinevirtual |
|
virtual |
This method builds a dynamic representation of the object in the Bullet world.
Reimplemented in chai3d::cBulletVehicle.
|
inlinevirtual |
Reimplemented in chai3d::cBulletMesh, chai3d::cBulletMultiMesh, and chai3d::cBulletVehicle.
| void chai3d::cBulletGenericObject::setSurfaceFriction | ( | const double | a_friction | ) |
This method assign a coefficient of friction to this object.
| double chai3d::cBulletGenericObject::getSurfaceFriction | ( | ) |
This method returns the coefficient of friction for this object. Zero is returned if the object has no dynamic model.
| void chai3d::cBulletGenericObject::addExternalForce | ( | const cVector3d & | a_force | ) |
This method applies an external force at the center of mass of the object.
| a_force | Force vector. |
| void chai3d::cBulletGenericObject::addExternalTorque | ( | const cVector3d & | a_torque | ) |
This method applies an external torque at the center of mass of the object.
| a_torque | Torque vector. |
| void chai3d::cBulletGenericObject::addExternalForceAtPoint | ( | const cVector3d & | a_force, |
| const cVector3d & | a_relativePos | ||
| ) |
This method applies an external force to the object at a given position. The relative position and force are expressed in global coordinates.
| a_force | Force vector. |
| a_relativePos | Relative position where force is applied. |
| void chai3d::cBulletGenericObject::setDamping | ( | const double & | a_dampingLin, |
| const double & | a_dampingAng | ||
| ) |
This method assigns a linear and angular damping term to the object.
| a_dampingLin | Linear damping. |
| a_dampingAng | Angular damping. |
| double chai3d::cBulletGenericObject::getDampingLin | ( | ) |
This method returns the linear damping term for this object. Zero is returned if the object has no dynamic model.
| double chai3d::cBulletGenericObject::getDampingAng | ( | ) |
This method returns the angular damping term for this object. Zero is returned if the object has no dynamic model.
|
protectedvirtual |
This method initializes the Bullet dynamic model.
| a_world | Bullet world to which this new object belongs to. |
init variables
| cBulletWorld* chai3d::cBulletGenericObject::m_dynamicWorld |
| btRigidBody* chai3d::cBulletGenericObject::m_bulletRigidBody |
| btCollisionShape* chai3d::cBulletGenericObject::m_bulletCollisionShape |
| btDefaultMotionState* chai3d::cBulletGenericObject::m_bulletMotionState |
|
protected |
|
protected |
|
protected |