Bullet Collision Detection & Physics Library
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
btRigidBody Class Reference

The btRigidBody is the main class for rigid body objects. More...

#include <btRigidBody.h>

Inheritance diagram for btRigidBody:
Inheritance graph
[legend]
Collaboration diagram for btRigidBody:
Collaboration graph
[legend]

Classes

struct  btRigidBodyConstructionInfo
 The btRigidBodyConstructionInfo structure provides information to create a rigid body. More...
 

Public Member Functions

 btRigidBody (const btRigidBodyConstructionInfo &constructionInfo)
 btRigidBody constructor using construction info More...
 
 btRigidBody (btScalar mass, btMotionState *motionState, btCollisionShape *collisionShape, const btVector3 &localInertia=btVector3(0, 0, 0))
 btRigidBody constructor for backwards compatibility. More...
 
virtual ~btRigidBody ()
 
void proceedToTransform (const btTransform &newTrans)
 
void predictIntegratedTransform (btScalar step, btTransform &predictedTransform)
 continuous collision detection needs prediction More...
 
void saveKinematicState (btScalar step)
 
void applyGravity ()
 
void clearGravity ()
 
void setGravity (const btVector3 &acceleration)
 
const btVector3getGravity () const
 
void setDamping (btScalar lin_damping, btScalar ang_damping)
 
btScalar getLinearDamping () const
 
btScalar getAngularDamping () const
 
btScalar getLinearSleepingThreshold () const
 
btScalar getAngularSleepingThreshold () const
 
void applyDamping (btScalar timeStep)
 applyDamping damps the velocity, using the given m_linearDamping and m_angularDamping More...
 
const btCollisionShapegetCollisionShape () const
 
btCollisionShapegetCollisionShape ()
 
void setMassProps (btScalar mass, const btVector3 &inertia)
 
const btVector3getLinearFactor () const
 
void setLinearFactor (const btVector3 &linearFactor)
 
btScalar getInvMass () const
 
btScalar getMass () const
 
const btMatrix3x3getInvInertiaTensorWorld () const
 
void integrateVelocities (btScalar step)
 
void setCenterOfMassTransform (const btTransform &xform)
 
void applyCentralForce (const btVector3 &force)
 
const btVector3getTotalForce () const
 
const btVector3getTotalTorque () const
 
const btVector3getInvInertiaDiagLocal () const
 
void setInvInertiaDiagLocal (const btVector3 &diagInvInertia)
 
void setSleepingThresholds (btScalar linear, btScalar angular)
 
void applyTorque (const btVector3 &torque)
 
void applyForce (const btVector3 &force, const btVector3 &rel_pos)
 
void applyCentralImpulse (const btVector3 &impulse)
 
void applyTorqueImpulse (const btVector3 &torque)
 
void applyImpulse (const btVector3 &impulse, const btVector3 &rel_pos)
 
void applyPushImpulse (const btVector3 &impulse, const btVector3 &rel_pos)
 
btVector3 getPushVelocity () const
 
btVector3 getTurnVelocity () const
 
void setPushVelocity (const btVector3 &v)
 
void setTurnVelocity (const btVector3 &v)
 
void applyCentralPushImpulse (const btVector3 &impulse)
 
void applyTorqueTurnImpulse (const btVector3 &torque)
 
void clearForces ()
 
void updateInertiaTensor ()
 
const btVector3getCenterOfMassPosition () const
 
btQuaternion getOrientation () const
 
const btTransformgetCenterOfMassTransform () const
 
const btVector3getLinearVelocity () const
 
const btVector3getAngularVelocity () const
 
void setLinearVelocity (const btVector3 &lin_vel)
 
void setAngularVelocity (const btVector3 &ang_vel)
 
btVector3 getVelocityInLocalPoint (const btVector3 &rel_pos) const
 
btVector3 getPushVelocityInLocalPoint (const btVector3 &rel_pos) const
 
void translate (const btVector3 &v)
 
void getAabb (btVector3 &aabbMin, btVector3 &aabbMax) const
 
btScalar computeImpulseDenominator (const btVector3 &pos, const btVector3 &normal) const
 
btScalar computeAngularImpulseDenominator (const btVector3 &axis) const
 
void updateDeactivation (btScalar timeStep)
 
bool wantsSleeping ()
 
const btBroadphaseProxygetBroadphaseProxy () const
 
btBroadphaseProxygetBroadphaseProxy ()
 
void setNewBroadphaseProxy (btBroadphaseProxy *broadphaseProxy)
 
btMotionStategetMotionState ()
 
const btMotionStategetMotionState () const
 
void setMotionState (btMotionState *motionState)
 
void setAngularFactor (const btVector3 &angFac)
 
void setAngularFactor (btScalar angFac)
 
const btVector3getAngularFactor () const
 
bool isInWorld () const
 
void addConstraintRef (btTypedConstraint *c)
 
void removeConstraintRef (btTypedConstraint *c)
 
btTypedConstraintgetConstraintRef (int index)
 
int getNumConstraintRefs () const
 
void setFlags (int flags)
 
int getFlags () const
 
btVector3 computeGyroscopicImpulseImplicit_World (btScalar dt) const
 perform implicit force computation in world space More...
 
btVector3 computeGyroscopicImpulseImplicit_Body (btScalar step) const
 perform implicit force computation in body space (inertial frame) More...
 
btVector3 computeGyroscopicForceExplicit (btScalar maxGyroscopicForce) const
 explicit version is best avoided, it gains energy More...
 
btVector3 getLocalInertia () const
 
virtual int calculateSerializeBufferSize () const
 
virtual const char * serialize (void *dataBuffer, class btSerializer *serializer) const
 fills the dataBuffer and returns the struct name (and 0 on failure) More...
 
virtual void serializeSingleObject (class btSerializer *serializer) const
 
- Public Member Functions inherited from btCollisionObject
 BT_DECLARE_ALIGNED_ALLOCATOR ()
 
bool mergesSimulationIslands () const
 
const btVector3getAnisotropicFriction () const
 
void setAnisotropicFriction (const btVector3 &anisotropicFriction, int frictionMode=CF_ANISOTROPIC_FRICTION)
 
bool hasAnisotropicFriction (int frictionMode=CF_ANISOTROPIC_FRICTION) const
 
void setContactProcessingThreshold (btScalar contactProcessingThreshold)
 the constraint solver can discard solving contacts, if the distance is above this threshold. More...
 
btScalar getContactProcessingThreshold () const
 
bool isStaticObject () const
 
bool isKinematicObject () const
 
bool isStaticOrKinematicObject () const
 
bool hasContactResponse () const
 
 btCollisionObject ()
 
virtual ~btCollisionObject ()
 
virtual void setCollisionShape (btCollisionShape *collisionShape)
 
const btCollisionShapegetCollisionShape () const
 
btCollisionShapegetCollisionShape ()
 
void setIgnoreCollisionCheck (const btCollisionObject *co, bool ignoreCollisionCheck)
 
int getNumObjectsWithoutCollision () const
 
const btCollisionObjectgetObjectWithoutCollision (int index)
 
virtual bool checkCollideWithOverride (const btCollisionObject *co) const
 
void * internalGetExtensionPointer () const
 Avoid using this internal API call, the extension pointer is used by some Bullet extensions. More...
 
void internalSetExtensionPointer (void *pointer)
 Avoid using this internal API call, the extension pointer is used by some Bullet extensions If you need to store your own user pointer, use 'setUserPointer/getUserPointer' instead. More...
 
int getActivationState () const
 
void setActivationState (int newState) const
 
void setDeactivationTime (btScalar time)
 
btScalar getDeactivationTime () const
 
void forceActivationState (int newState) const
 
void activate (bool forceActivation=false) const
 
bool isActive () const
 
void setRestitution (btScalar rest)
 
btScalar getRestitution () const
 
void setFriction (btScalar frict)
 
btScalar getFriction () const
 
void setRollingFriction (btScalar frict)
 
btScalar getRollingFriction () const
 
void setSpinningFriction (btScalar frict)
 
btScalar getSpinningFriction () const
 
void setContactStiffnessAndDamping (btScalar stiffness, btScalar damping)
 
btScalar getContactStiffness () const
 
btScalar getContactDamping () const
 
int getInternalType () const
 reserved for Bullet internal usage More...
 
btTransformgetWorldTransform ()
 
const btTransformgetWorldTransform () const
 
void setWorldTransform (const btTransform &worldTrans)
 
btBroadphaseProxygetBroadphaseHandle ()
 
const btBroadphaseProxygetBroadphaseHandle () const
 
void setBroadphaseHandle (btBroadphaseProxy *handle)
 
const btTransformgetInterpolationWorldTransform () const
 
btTransformgetInterpolationWorldTransform ()
 
void setInterpolationWorldTransform (const btTransform &trans)
 
void setInterpolationLinearVelocity (const btVector3 &linvel)
 
void setInterpolationAngularVelocity (const btVector3 &angvel)
 
const btVector3getInterpolationLinearVelocity () const
 
const btVector3getInterpolationAngularVelocity () const
 
int getIslandTag () const
 
void setIslandTag (int tag)
 
int getCompanionId () const
 
void setCompanionId (int id)
 
int getWorldArrayIndex () const
 
void setWorldArrayIndex (int ix)
 
btScalar getHitFraction () const
 
void setHitFraction (btScalar hitFraction)
 
int getCollisionFlags () const
 
void setCollisionFlags (int flags)
 
btScalar getCcdSweptSphereRadius () const
 Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm:: More...
 
void setCcdSweptSphereRadius (btScalar radius)
 Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm:: More...
 
btScalar getCcdMotionThreshold () const
 
btScalar getCcdSquareMotionThreshold () const
 
void setCcdMotionThreshold (btScalar ccdMotionThreshold)
 Don't do continuous collision detection if the motion (in one step) is less then m_ccdMotionThreshold. More...
 
void * getUserPointer () const
 users can point to their objects, userPointer is not used by Bullet More...
 
int getUserIndex () const
 
int getUserIndex2 () const
 
int getUserIndex3 () const
 
void setUserPointer (void *userPointer)
 users can point to their objects, userPointer is not used by Bullet More...
 
void setUserIndex (int index)
 users can point to their objects, userPointer is not used by Bullet More...
 
void setUserIndex2 (int index)
 
void setUserIndex3 (int index)
 
int getUpdateRevisionInternal () const
 
void setCustomDebugColor (const btVector3 &colorRGB)
 
void removeCustomDebugColor ()
 
bool getCustomDebugColor (btVector3 &colorRGB) const
 
bool checkCollideWith (const btCollisionObject *co) const
 
virtual int calculateSerializeBufferSize () const
 
virtual const char * serialize (void *dataBuffer, class btSerializer *serializer) const
 fills the dataBuffer and returns the struct name (and 0 on failure) More...
 
virtual void serializeSingleObject (class btSerializer *serializer) const
 

Static Public Member Functions

static const btRigidBodyupcast (const btCollisionObject *colObj)
 to keep collision detection and dynamics separate we don't store a rigidbody pointer but a rigidbody is derived from btCollisionObject, so we can safely perform an upcast More...
 
static btRigidBodyupcast (btCollisionObject *colObj)
 

Public Attributes

int m_contactSolverType
 
int m_frictionSolverType
 

Protected Member Functions

void setupRigidBody (const btRigidBodyConstructionInfo &constructionInfo)
 setupRigidBody is only used internally by the constructor More...
 

Protected Attributes

btVector3 m_deltaLinearVelocity
 
btVector3 m_deltaAngularVelocity
 
btVector3 m_angularFactor
 
btVector3 m_invMass
 
btVector3 m_pushVelocity
 
btVector3 m_turnVelocity
 
- Protected Attributes inherited from btCollisionObject
btTransform m_worldTransform
 
btTransform m_interpolationWorldTransform
 m_interpolationWorldTransform is used for CCD and interpolation it can be either previous or future (predicted) transform More...
 
btVector3 m_interpolationLinearVelocity
 
btVector3 m_interpolationAngularVelocity
 
btVector3 m_anisotropicFriction
 
int m_hasAnisotropicFriction
 
btScalar m_contactProcessingThreshold
 
btBroadphaseProxym_broadphaseHandle
 
btCollisionShapem_collisionShape
 
void * m_extensionPointer
 m_extensionPointer is used by some internal low-level Bullet extensions. More...
 
btCollisionShapem_rootCollisionShape
 m_rootCollisionShape is temporarily used to store the original collision shape The m_collisionShape might be temporarily replaced by a child collision shape during collision detection purposes If it is NULL, the m_collisionShape is not temporarily replaced. More...
 
int m_collisionFlags
 
int m_islandTag1
 
int m_companionId
 
int m_worldArrayIndex
 
int m_activationState1
 
btScalar m_deactivationTime
 
btScalar m_friction
 
btScalar m_restitution
 
btScalar m_rollingFriction
 
btScalar m_spinningFriction
 
btScalar m_contactDamping
 
btScalar m_contactStiffness
 
int m_internalType
 m_internalType is reserved to distinguish Bullet's btCollisionObject, btRigidBody, btSoftBody, btGhostObject etc. More...
 
void * m_userObjectPointer
 users can point to their objects, m_userPointer is not used by Bullet, see setUserPointer/getUserPointer More...
 
int m_userIndex2
 
int m_userIndex
 
int m_userIndex3
 
btScalar m_hitFraction
 time of impact calculation More...
 
btScalar m_ccdSweptSphereRadius
 Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm:: More...
 
btScalar m_ccdMotionThreshold
 Don't do continuous collision detection if the motion (in one step) is less then m_ccdMotionThreshold. More...
 
int m_checkCollideWith
 If some object should have elaborate collision filtering by sub-classes. More...
 
btAlignedObjectArray< const btCollisionObject * > m_objectsWithoutCollisionCheck
 
int m_updateRevision
 internal update revision number. It will be increased when the object changes. This allows some subsystems to perform lazy evaluation. More...
 
btVector3 m_customDebugColorRGB
 

Private Attributes

btMatrix3x3 m_invInertiaTensorWorld
 
btVector3 m_linearVelocity
 
btVector3 m_angularVelocity
 
btScalar m_inverseMass
 
btVector3 m_linearFactor
 
btVector3 m_gravity
 
btVector3 m_gravity_acceleration
 
btVector3 m_invInertiaLocal
 
btVector3 m_totalForce
 
btVector3 m_totalTorque
 
btScalar m_linearDamping
 
btScalar m_angularDamping
 
bool m_additionalDamping
 
btScalar m_additionalDampingFactor
 
btScalar m_additionalLinearDampingThresholdSqr
 
btScalar m_additionalAngularDampingThresholdSqr
 
btScalar m_additionalAngularDampingFactor
 
btScalar m_linearSleepingThreshold
 
btScalar m_angularSleepingThreshold
 
btMotionStatem_optionalMotionState
 
btAlignedObjectArray< btTypedConstraint * > m_constraintRefs
 
int m_rigidbodyFlags
 
int m_debugBodyId
 

Additional Inherited Members

- Public Types inherited from btCollisionObject
enum  CollisionFlags {
  CF_DYNAMIC_OBJECT = 0 ,
  CF_STATIC_OBJECT = 1 ,
  CF_KINEMATIC_OBJECT = 2 ,
  CF_NO_CONTACT_RESPONSE = 4 ,
  CF_CUSTOM_MATERIAL_CALLBACK = 8 ,
  CF_CHARACTER_OBJECT = 16 ,
  CF_DISABLE_VISUALIZE_OBJECT = 32 ,
  CF_DISABLE_SPU_COLLISION_PROCESSING = 64 ,
  CF_HAS_CONTACT_STIFFNESS_DAMPING = 128 ,
  CF_HAS_CUSTOM_DEBUG_RENDERING_COLOR = 256 ,
  CF_HAS_FRICTION_ANCHOR = 512 ,
  CF_HAS_COLLISION_SOUND_TRIGGER = 1024
}
 
enum  CollisionObjectTypes {
  CO_COLLISION_OBJECT = 1 ,
  CO_RIGID_BODY = 2 ,
  CO_GHOST_OBJECT = 4 ,
  CO_SOFT_BODY = 8 ,
  CO_HF_FLUID = 16 ,
  CO_USER_TYPE = 32 ,
  CO_FEATHERSTONE_LINK = 64
}
 
enum  AnisotropicFrictionFlags {
  CF_ANISOTROPIC_FRICTION_DISABLED = 0 ,
  CF_ANISOTROPIC_FRICTION = 1 ,
  CF_ANISOTROPIC_ROLLING_FRICTION = 2
}
 

Detailed Description

The btRigidBody is the main class for rigid body objects.

It is derived from btCollisionObject, so it keeps a pointer to a btCollisionShape. It is recommended for performance and memory use to share btCollisionShape objects whenever possible. There are 3 types of rigid bodies:

Definition at line 59 of file btRigidBody.h.

Constructor & Destructor Documentation

◆ btRigidBody() [1/2]

btRigidBody::btRigidBody ( const btRigidBodyConstructionInfo constructionInfo)

btRigidBody constructor using construction info

Definition at line 29 of file btRigidBody.cpp.

◆ btRigidBody() [2/2]

btRigidBody::btRigidBody ( btScalar  mass,
btMotionState motionState,
btCollisionShape collisionShape,
const btVector3 localInertia = btVector3(0, 0, 0) 
)

btRigidBody constructor for backwards compatibility.

To specify friction (etc) during rigid body construction, please use the other constructor (using btRigidBodyConstructionInfo)

Definition at line 34 of file btRigidBody.cpp.

◆ ~btRigidBody()

virtual btRigidBody::~btRigidBody ( )
inlinevirtual

Definition at line 173 of file btRigidBody.h.

Member Function Documentation

◆ addConstraintRef()

void btRigidBody::addConstraintRef ( btTypedConstraint c)

disable collision with the 'other' body

Definition at line 415 of file btRigidBody.cpp.

◆ applyCentralForce()

void btRigidBody::applyCentralForce ( const btVector3 force)
inline

Definition at line 274 of file btRigidBody.h.

◆ applyCentralImpulse()

void btRigidBody::applyCentralImpulse ( const btVector3 impulse)
inline

Definition at line 319 of file btRigidBody.h.

◆ applyCentralPushImpulse()

void btRigidBody::applyCentralPushImpulse ( const btVector3 impulse)
inline

Definition at line 399 of file btRigidBody.h.

◆ applyDamping()

void btRigidBody::applyDamping ( btScalar  timeStep)

applyDamping damps the velocity, using the given m_linearDamping and m_angularDamping

Definition at line 149 of file btRigidBody.cpp.

◆ applyForce()

void btRigidBody::applyForce ( const btVector3 force,
const btVector3 rel_pos 
)
inline

Definition at line 313 of file btRigidBody.h.

◆ applyGravity()

void btRigidBody::applyGravity ( )

Definition at line 205 of file btRigidBody.cpp.

◆ applyImpulse()

void btRigidBody::applyImpulse ( const btVector3 impulse,
const btVector3 rel_pos 
)
inline

Definition at line 335 of file btRigidBody.h.

◆ applyPushImpulse()

void btRigidBody::applyPushImpulse ( const btVector3 impulse,
const btVector3 rel_pos 
)
inline

Definition at line 347 of file btRigidBody.h.

◆ applyTorque()

void btRigidBody::applyTorque ( const btVector3 torque)
inline

Definition at line 305 of file btRigidBody.h.

◆ applyTorqueImpulse()

void btRigidBody::applyTorqueImpulse ( const btVector3 torque)
inline

Definition at line 327 of file btRigidBody.h.

◆ applyTorqueTurnImpulse()

void btRigidBody::applyTorqueTurnImpulse ( const btVector3 torque)
inline

Definition at line 407 of file btRigidBody.h.

◆ calculateSerializeBufferSize()

int btRigidBody::calculateSerializeBufferSize ( ) const
virtual

Reimplemented from btCollisionObject.

Definition at line 458 of file btRigidBody.cpp.

◆ clearForces()

void btRigidBody::clearForces ( )
inline

Definition at line 415 of file btRigidBody.h.

◆ clearGravity()

void btRigidBody::clearGravity ( )

Definition at line 213 of file btRigidBody.cpp.

◆ computeAngularImpulseDenominator()

btScalar btRigidBody::computeAngularImpulseDenominator ( const btVector3 axis) const
inline

Definition at line 493 of file btRigidBody.h.

◆ computeGyroscopicForceExplicit()

btVector3 btRigidBody::computeGyroscopicForceExplicit ( btScalar  maxGyroscopicForce) const

explicit version is best avoided, it gains energy

Definition at line 283 of file btRigidBody.cpp.

◆ computeGyroscopicImpulseImplicit_Body()

btVector3 btRigidBody::computeGyroscopicImpulseImplicit_Body ( btScalar  step) const

perform implicit force computation in body space (inertial frame)

Definition at line 297 of file btRigidBody.cpp.

◆ computeGyroscopicImpulseImplicit_World()

btVector3 btRigidBody::computeGyroscopicImpulseImplicit_World ( btScalar  dt) const

perform implicit force computation in world space

Definition at line 336 of file btRigidBody.cpp.

◆ computeImpulseDenominator()

btScalar btRigidBody::computeImpulseDenominator ( const btVector3 pos,
const btVector3 normal 
) const
inline

Definition at line 482 of file btRigidBody.h.

◆ getAabb()

void btRigidBody::getAabb ( btVector3 aabbMin,
btVector3 aabbMax 
) const

Definition at line 123 of file btRigidBody.cpp.

◆ getAngularDamping()

btScalar btRigidBody::getAngularDamping ( ) const
inline

Definition at line 225 of file btRigidBody.h.

◆ getAngularFactor()

const btVector3 & btRigidBody::getAngularFactor ( ) const
inline

Definition at line 579 of file btRigidBody.h.

◆ getAngularSleepingThreshold()

btScalar btRigidBody::getAngularSleepingThreshold ( ) const
inline

Definition at line 235 of file btRigidBody.h.

◆ getAngularVelocity()

const btVector3 & btRigidBody::getAngularVelocity ( ) const
inline

Definition at line 437 of file btRigidBody.h.

◆ getBroadphaseProxy() [1/2]

btBroadphaseProxy * btRigidBody::getBroadphaseProxy ( )
inline

Definition at line 539 of file btRigidBody.h.

◆ getBroadphaseProxy() [2/2]

const btBroadphaseProxy * btRigidBody::getBroadphaseProxy ( ) const
inline

Definition at line 535 of file btRigidBody.h.

◆ getCenterOfMassPosition()

const btVector3 & btRigidBody::getCenterOfMassPosition ( ) const
inline

Definition at line 423 of file btRigidBody.h.

◆ getCenterOfMassTransform()

const btTransform & btRigidBody::getCenterOfMassTransform ( ) const
inline

Definition at line 429 of file btRigidBody.h.

◆ getCollisionShape() [1/2]

btCollisionShape * btRigidBody::getCollisionShape ( )
inline

Definition at line 247 of file btRigidBody.h.

◆ getCollisionShape() [2/2]

const btCollisionShape * btRigidBody::getCollisionShape ( ) const
inline

Definition at line 242 of file btRigidBody.h.

◆ getConstraintRef()

btTypedConstraint * btRigidBody::getConstraintRef ( int  index)
inline

Definition at line 593 of file btRigidBody.h.

◆ getFlags()

int btRigidBody::getFlags ( ) const
inline

Definition at line 608 of file btRigidBody.h.

◆ getGravity()

const btVector3 & btRigidBody::getGravity ( ) const
inline

Definition at line 213 of file btRigidBody.h.

◆ getInvInertiaDiagLocal()

const btVector3 & btRigidBody::getInvInertiaDiagLocal ( ) const
inline

Definition at line 289 of file btRigidBody.h.

◆ getInvInertiaTensorWorld()

const btMatrix3x3 & btRigidBody::getInvInertiaTensorWorld ( ) const
inline

Definition at line 265 of file btRigidBody.h.

◆ getInvMass()

btScalar btRigidBody::getInvMass ( ) const
inline

Definition at line 263 of file btRigidBody.h.

◆ getLinearDamping()

btScalar btRigidBody::getLinearDamping ( ) const
inline

Definition at line 220 of file btRigidBody.h.

◆ getLinearFactor()

const btVector3 & btRigidBody::getLinearFactor ( ) const
inline

Definition at line 254 of file btRigidBody.h.

◆ getLinearSleepingThreshold()

btScalar btRigidBody::getLinearSleepingThreshold ( ) const
inline

Definition at line 230 of file btRigidBody.h.

◆ getLinearVelocity()

const btVector3 & btRigidBody::getLinearVelocity ( ) const
inline

Definition at line 433 of file btRigidBody.h.

◆ getLocalInertia()

btVector3 btRigidBody::getLocalInertia ( ) const

Definition at line 254 of file btRigidBody.cpp.

◆ getMass()

btScalar btRigidBody::getMass ( ) const
inline

Definition at line 264 of file btRigidBody.h.

◆ getMotionState() [1/2]

btMotionState * btRigidBody::getMotionState ( )
inline

Definition at line 549 of file btRigidBody.h.

◆ getMotionState() [2/2]

const btMotionState * btRigidBody::getMotionState ( ) const
inline

Definition at line 553 of file btRigidBody.h.

◆ getNumConstraintRefs()

int btRigidBody::getNumConstraintRefs ( ) const
inline

Definition at line 598 of file btRigidBody.h.

◆ getOrientation()

btQuaternion btRigidBody::getOrientation ( ) const

Definition at line 392 of file btRigidBody.cpp.

◆ getPushVelocity()

btVector3 btRigidBody::getPushVelocity ( ) const
inline

Definition at line 359 of file btRigidBody.h.

◆ getPushVelocityInLocalPoint()

btVector3 btRigidBody::getPushVelocityInLocalPoint ( const btVector3 rel_pos) const
inline

Definition at line 469 of file btRigidBody.h.

◆ getTotalForce()

const btVector3 & btRigidBody::getTotalForce ( ) const
inline

Definition at line 279 of file btRigidBody.h.

◆ getTotalTorque()

const btVector3 & btRigidBody::getTotalTorque ( ) const
inline

Definition at line 284 of file btRigidBody.h.

◆ getTurnVelocity()

btVector3 btRigidBody::getTurnVelocity ( ) const
inline

Definition at line 364 of file btRigidBody.h.

◆ getVelocityInLocalPoint()

btVector3 btRigidBody::getVelocityInLocalPoint ( const btVector3 rel_pos) const
inline

Definition at line 460 of file btRigidBody.h.

◆ integrateVelocities()

void btRigidBody::integrateVelocities ( btScalar  step)

clamp angular velocity. collision calculations will fail on higher angular velocities

Definition at line 372 of file btRigidBody.cpp.

◆ isInWorld()

bool btRigidBody::isInWorld ( ) const
inline

Definition at line 585 of file btRigidBody.h.

◆ predictIntegratedTransform()

void btRigidBody::predictIntegratedTransform ( btScalar  step,
btTransform predictedTransform 
)

continuous collision detection needs prediction

Definition at line 100 of file btRigidBody.cpp.

◆ proceedToTransform()

void btRigidBody::proceedToTransform ( const btTransform newTrans)

Definition at line 221 of file btRigidBody.cpp.

◆ removeConstraintRef()

void btRigidBody::removeConstraintRef ( btTypedConstraint c)

Definition at line 438 of file btRigidBody.cpp.

◆ saveKinematicState()

void btRigidBody::saveKinematicState ( btScalar  step)

Definition at line 105 of file btRigidBody.cpp.

◆ serialize()

const char * btRigidBody::serialize ( void *  dataBuffer,
class btSerializer serializer 
) const
virtual

fills the dataBuffer and returns the struct name (and 0 on failure)

Reimplemented from btCollisionObject.

Definition at line 465 of file btRigidBody.cpp.

◆ serializeSingleObject()

void btRigidBody::serializeSingleObject ( class btSerializer serializer) const
virtual

Reimplemented from btCollisionObject.

Definition at line 500 of file btRigidBody.cpp.

◆ setAngularFactor() [1/2]

void btRigidBody::setAngularFactor ( btScalar  angFac)
inline

Definition at line 574 of file btRigidBody.h.

◆ setAngularFactor() [2/2]

void btRigidBody::setAngularFactor ( const btVector3 angFac)
inline

Definition at line 568 of file btRigidBody.h.

◆ setAngularVelocity()

void btRigidBody::setAngularVelocity ( const btVector3 ang_vel)
inline

Definition at line 451 of file btRigidBody.h.

◆ setCenterOfMassTransform()

void btRigidBody::setCenterOfMassTransform ( const btTransform xform)

Definition at line 399 of file btRigidBody.cpp.

◆ setDamping()

void btRigidBody::setDamping ( btScalar  lin_damping,
btScalar  ang_damping 
)

Definition at line 137 of file btRigidBody.cpp.

◆ setFlags()

void btRigidBody::setFlags ( int  flags)
inline

Definition at line 603 of file btRigidBody.h.

◆ setGravity()

void btRigidBody::setGravity ( const btVector3 acceleration)

Definition at line 128 of file btRigidBody.cpp.

◆ setInvInertiaDiagLocal()

void btRigidBody::setInvInertiaDiagLocal ( const btVector3 diagInvInertia)
inline

Definition at line 294 of file btRigidBody.h.

◆ setLinearFactor()

void btRigidBody::setLinearFactor ( const btVector3 linearFactor)
inline

Definition at line 258 of file btRigidBody.h.

◆ setLinearVelocity()

void btRigidBody::setLinearVelocity ( const btVector3 lin_vel)
inline

Definition at line 442 of file btRigidBody.h.

◆ setMassProps()

void btRigidBody::setMassProps ( btScalar  mass,
const btVector3 inertia 
)

Definition at line 226 of file btRigidBody.cpp.

◆ setMotionState()

void btRigidBody::setMotionState ( btMotionState motionState)
inline

Definition at line 557 of file btRigidBody.h.

◆ setNewBroadphaseProxy()

void btRigidBody::setNewBroadphaseProxy ( btBroadphaseProxy broadphaseProxy)
inline

Definition at line 543 of file btRigidBody.h.

◆ setPushVelocity()

void btRigidBody::setPushVelocity ( const btVector3 v)
inline

Definition at line 369 of file btRigidBody.h.

◆ setSleepingThresholds()

void btRigidBody::setSleepingThresholds ( btScalar  linear,
btScalar  angular 
)
inline

Definition at line 299 of file btRigidBody.h.

◆ setTurnVelocity()

void btRigidBody::setTurnVelocity ( const btVector3 v)
inline

Definition at line 391 of file btRigidBody.h.

◆ setupRigidBody()

void btRigidBody::setupRigidBody ( const btRigidBodyConstructionInfo constructionInfo)
protected

setupRigidBody is only used internally by the constructor

Definition at line 40 of file btRigidBody.cpp.

◆ translate()

void btRigidBody::translate ( const btVector3 v)
inline

Definition at line 475 of file btRigidBody.h.

◆ upcast() [1/2]

static btRigidBody * btRigidBody::upcast ( btCollisionObject colObj)
inlinestatic

Definition at line 195 of file btRigidBody.h.

◆ upcast() [2/2]

static const btRigidBody * btRigidBody::upcast ( const btCollisionObject colObj)
inlinestatic

to keep collision detection and dynamics separate we don't store a rigidbody pointer but a rigidbody is derived from btCollisionObject, so we can safely perform an upcast

Definition at line 189 of file btRigidBody.h.

◆ updateDeactivation()

void btRigidBody::updateDeactivation ( btScalar  timeStep)
inline

Definition at line 499 of file btRigidBody.h.

◆ updateInertiaTensor()

void btRigidBody::updateInertiaTensor ( )

Definition at line 249 of file btRigidBody.cpp.

◆ wantsSleeping()

bool btRigidBody::wantsSleeping ( )
inline

Definition at line 516 of file btRigidBody.h.

Member Data Documentation

◆ m_additionalAngularDampingFactor

btScalar btRigidBody::m_additionalAngularDampingFactor
private

Definition at line 80 of file btRigidBody.h.

◆ m_additionalAngularDampingThresholdSqr

btScalar btRigidBody::m_additionalAngularDampingThresholdSqr
private

Definition at line 79 of file btRigidBody.h.

◆ m_additionalDamping

bool btRigidBody::m_additionalDamping
private

Definition at line 76 of file btRigidBody.h.

◆ m_additionalDampingFactor

btScalar btRigidBody::m_additionalDampingFactor
private

Definition at line 77 of file btRigidBody.h.

◆ m_additionalLinearDampingThresholdSqr

btScalar btRigidBody::m_additionalLinearDampingThresholdSqr
private

Definition at line 78 of file btRigidBody.h.

◆ m_angularDamping

btScalar btRigidBody::m_angularDamping
private

Definition at line 74 of file btRigidBody.h.

◆ m_angularFactor

btVector3 btRigidBody::m_angularFactor
protected

Definition at line 98 of file btRigidBody.h.

◆ m_angularSleepingThreshold

btScalar btRigidBody::m_angularSleepingThreshold
private

Definition at line 83 of file btRigidBody.h.

◆ m_angularVelocity

btVector3 btRigidBody::m_angularVelocity
private

Definition at line 63 of file btRigidBody.h.

◆ m_constraintRefs

btAlignedObjectArray<btTypedConstraint*> btRigidBody::m_constraintRefs
private

Definition at line 89 of file btRigidBody.h.

◆ m_contactSolverType

int btRigidBody::m_contactSolverType

Definition at line 565 of file btRigidBody.h.

◆ m_debugBodyId

int btRigidBody::m_debugBodyId
private

Definition at line 93 of file btRigidBody.h.

◆ m_deltaAngularVelocity

btVector3 btRigidBody::m_deltaAngularVelocity
protected

Definition at line 97 of file btRigidBody.h.

◆ m_deltaLinearVelocity

btVector3 btRigidBody::m_deltaLinearVelocity
protected

Definition at line 96 of file btRigidBody.h.

◆ m_frictionSolverType

int btRigidBody::m_frictionSolverType

Definition at line 566 of file btRigidBody.h.

◆ m_gravity

btVector3 btRigidBody::m_gravity
private

Definition at line 67 of file btRigidBody.h.

◆ m_gravity_acceleration

btVector3 btRigidBody::m_gravity_acceleration
private

Definition at line 68 of file btRigidBody.h.

◆ m_inverseMass

btScalar btRigidBody::m_inverseMass
private

Definition at line 64 of file btRigidBody.h.

◆ m_invInertiaLocal

btVector3 btRigidBody::m_invInertiaLocal
private

Definition at line 69 of file btRigidBody.h.

◆ m_invInertiaTensorWorld

btMatrix3x3 btRigidBody::m_invInertiaTensorWorld
private

Definition at line 61 of file btRigidBody.h.

◆ m_invMass

btVector3 btRigidBody::m_invMass
protected

Definition at line 99 of file btRigidBody.h.

◆ m_linearDamping

btScalar btRigidBody::m_linearDamping
private

Definition at line 73 of file btRigidBody.h.

◆ m_linearFactor

btVector3 btRigidBody::m_linearFactor
private

Definition at line 65 of file btRigidBody.h.

◆ m_linearSleepingThreshold

btScalar btRigidBody::m_linearSleepingThreshold
private

Definition at line 82 of file btRigidBody.h.

◆ m_linearVelocity

btVector3 btRigidBody::m_linearVelocity
private

Definition at line 62 of file btRigidBody.h.

◆ m_optionalMotionState

btMotionState* btRigidBody::m_optionalMotionState
private

Definition at line 86 of file btRigidBody.h.

◆ m_pushVelocity

btVector3 btRigidBody::m_pushVelocity
protected

Definition at line 100 of file btRigidBody.h.

◆ m_rigidbodyFlags

int btRigidBody::m_rigidbodyFlags
private

Definition at line 91 of file btRigidBody.h.

◆ m_totalForce

btVector3 btRigidBody::m_totalForce
private

Definition at line 70 of file btRigidBody.h.

◆ m_totalTorque

btVector3 btRigidBody::m_totalTorque
private

Definition at line 71 of file btRigidBody.h.

◆ m_turnVelocity

btVector3 btRigidBody::m_turnVelocity
protected

Definition at line 101 of file btRigidBody.h.


The documentation for this class was generated from the following files: