45#ifndef CBulletGenericObjectH
46#define CBulletGenericObjectH
50#include "btBulletDynamicsCommon.h"
125 virtual void setMass(
const double a_mass);
192 void setDamping(
const double& a_dampingLin,
const double& a_dampingAng);
Definition CBulletGenericObject.h:94
btDefaultMotionState * m_bulletMotionState
Bullet motion state.
Definition CBulletGenericObject.h:217
virtual void updateBodyPosition(void)
This method updates the position and orientation from the Bullet model to CHAI3D model.
Definition CBulletGenericObject.h:115
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 obj...
Definition CBulletGenericObject.cpp:221
virtual void buildDynamicModel()
This method builds a dynamic representation of the object in the Bullet world.
Definition CBulletGenericObject.cpp:193
virtual void updatePositionFromDynamics()
This method updates the CHAI3D position representation from the Bullet dynamics engine.
Definition CBulletGenericObject.h:152
virtual void setMass(const double a_mass)
This method assigns a mass value to this object.
Definition CBulletGenericObject.cpp:112
double getSurfaceFriction()
This method returns the coefficient of friction for this object.
Definition CBulletGenericObject.cpp:342
virtual void initialize(cBulletWorld *a_world)
This method initializes the Bullet object.
Definition CBulletGenericObject.cpp:61
cBulletGenericObject(cBulletWorld *a_world)
Constructor of cBulletGenericBody.
Definition CBulletGenericObject.h:102
void addExternalTorque(const cVector3d &a_torque)
This method applies an external torque at the center of mass of of this object.
Definition CBulletGenericObject.cpp:254
void setDamping(const double &a_dampingLin, const double &a_dampingAng)
This method assigns a linear and angular damping term to the object.
Definition CBulletGenericObject.cpp:271
virtual ~cBulletGenericObject()
Destructor of cBulletGenericBody.
Definition CBulletGenericObject.cpp:88
cVector3d m_inertia
Inertia properties.
Definition CBulletGenericObject.h:243
double getMass() const
This method returns the mass value for this object.
Definition CBulletGenericObject.h:128
virtual void setStatic(bool a_static)
This method enables of disables the object to be static in the world.
Definition CBulletGenericObject.cpp:178
virtual void setInertia(const cVector3d &a_inertia)
This method assigns an inertia properties to this object.
Definition CBulletGenericObject.cpp:125
bool m_static
If true then object is static and does not move, false otherwise.
Definition CBulletGenericObject.h:237
double getDampingAng()
This method returns the angular damping term for this object.
Definition CBulletGenericObject.cpp:307
btRigidBody * m_bulletRigidBody
Bullet rigid body.
Definition CBulletGenericObject.h:211
virtual bool getStatic() const
This method returns true if the object is static, false otherwise.
Definition CBulletGenericObject.h:146
virtual void estimateInertia()
This method estimates the inertia properties for this object.
Definition CBulletGenericObject.cpp:152
double getDampingLin()
This method returns the linear damping term for this object.
Definition CBulletGenericObject.cpp:288
void setSurfaceFriction(const double a_friction)
This method assign a coefficient of friction to this object.
Definition CBulletGenericObject.cpp:325
cVector3d getInertia()
This method returns the inertia properties of this object.
Definition CBulletGenericObject.h:134
void addExternalForce(const cVector3d &a_force)
This method applies an external force at the center of mass of this object.
Definition CBulletGenericObject.cpp:238
cBulletWorld * m_dynamicWorld
Bullet world.
Definition CBulletGenericObject.h:208
virtual void setMassInertia(const double a_mass, const cVector3d &a_inertia)
This method assigns a mass and an inertia to this object.
Definition CBulletGenericObject.cpp:139
btCollisionShape * m_bulletCollisionShape
Bullet collision shape.
Definition CBulletGenericObject.h:214
double m_mass
Mass property.
Definition CBulletGenericObject.h:240
This class implements an Bullet dynamic world.
Definition CBulletWorld.h:82
cBulletDynamicModelType
Bullet geometry used for dynamic collision computation.
Definition CBulletGenericObject.h:72
@ BULLET_MODEL_PLANE
Definition CBulletGenericObject.h:76
@ BULLET_MODEL_CYLINDER
Definition CBulletGenericObject.h:75
@ BULLET_MODEL_SPHERE
Definition CBulletGenericObject.h:74
@ BULLET_MODEL_BOX
Definition CBulletGenericObject.h:73
@ BULLET_MODEL_TRIMESH
Definition CBulletGenericObject.h:77