Bullet Collision Detection & Physics Library
|
Go to the documentation of this file.
16 #ifndef BT_RIGIDBODY_H
17 #define BT_RIGIDBODY_H
31 #ifdef BT_USE_DOUBLE_PRECISION
32 #define btRigidBodyData btRigidBodyDoubleData
33 #define btRigidBodyDataName "btRigidBodyDoubleData"
35 #define btRigidBodyData btRigidBodyFloatData
36 #define btRigidBodyDataName "btRigidBodyFloatData"
37 #endif //BT_USE_DOUBLE_PRECISION
167 btRigidBody(
const btRigidBodyConstructionInfo& constructionInfo);
182 void setupRigidBody(
const btRigidBodyConstructionInfo& constructionInfo);
449 return axis.
dot(vec);
640 #endif //BT_RIGIDBODY_H
btMatrix3x3DoubleData m_invInertiaTensorWorld
btScalar getAngularDamping() const
TypedConstraint is the baseclass for Bullet constraints and vehicles.
float m_additionalAngularDampingFactor
btCollisionObject can be used to manage collision detection objects.
btMatrix3x3 m_invInertiaTensorWorld
The btBroadphaseProxy is the main class that can be used with the Bullet broadphases.
The btRigidBody is the main class for rigid body objects.
const btVector3 & getTotalTorque() const
void setAngularFactor(const btVector3 &angFac)
btVector3FloatData m_invInertiaLocal
btScalar m_angularSleepingThreshold
btScalar m_angularDamping
BT_ENABLE_GYROPSCOPIC_FORCE flags is enabled by default in Bullet 2.83 and onwards.
void predictIntegratedTransform(btScalar step, btTransform &predictedTransform)
continuous collision detection needs prediction
#define DISABLE_DEACTIVATION
btScalar m_angularDamping
btVector3DoubleData m_gravity_acceleration
btScalar m_additionalAngularDampingThresholdSqr
virtual const char * serialize(void *dataBuffer, class btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatr...
btScalar gDeactivationTime
virtual void serializeSingleObject(class btSerializer *serializer) const
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
btScalar m_additionalLinearDampingThresholdSqr
const btVector3 & getAngularVelocity() const
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
btVector3FloatData m_gravity
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
void setGravity(const btVector3 &acceleration)
btBroadphaseProxy * getBroadphaseProxy()
void setSleepingThresholds(btScalar linear, btScalar angular)
int getNumConstraintRefs() const
btVector3 computeGyroscopicForceExplicit(btScalar maxGyroscopicForce) const
explicit version is best avoided, it gains energy
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
btScalar getLinearDamping() const
btVector3 cross(const btVector3 &v) const
Return the cross product between this and another vector.
float m_additionalLinearDampingThresholdSqr
void updateInertiaTensor()
void getAabb(btVector3 &aabbMin, btVector3 &aabbMax) const
btVector3FloatData m_linearFactor
virtual void getWorldTransform(btTransform &worldTrans) const =0
btVector3DoubleData m_angularFactor
btVector3FloatData m_totalForce
btVector3DoubleData m_invInertiaLocal
btCollisionObjectDoubleData m_collisionObjectData
void translate(const btVector3 &v)
double m_additionalAngularDampingThresholdSqr
void integrateVelocities(btScalar step)
btScalar dot(const btVector3 &v) const
Return the dot product.
btScalar getAngularSleepingThreshold() const
int getActivationState() const
btTransform m_worldTransform
btVector3 computeGyroscopicImpulseImplicit_World(btScalar dt) const
perform implicit force computation in world space
double m_linearSleepingThreshold
void applyTorqueImpulse(const btVector3 &torque)
btVector3FloatData m_angularFactor
btScalar m_spinningFriction
const btTransform & getCenterOfMassTransform() const
btTransform m_startWorldTransform
btScalar m_deactivationTime
void setDamping(btScalar lin_damping, btScalar ang_damping)
btScalar m_angularSleepingThreshold
void setLinearFactor(const btVector3 &linearFactor)
btQuaternion getOrientation() const
double m_angularSleepingThreshold
bool gDisableDeactivation
btScalar m_additionalLinearDampingThresholdSqr
btMotionState * m_optionalMotionState
virtual int calculateSerializeBufferSize() const
const btVector3 & getInvInertiaDiagLocal() const
void setLinearVelocity(const btVector3 &lin_vel)
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
btCollisionShape * m_collisionShape
void setupRigidBody(const btRigidBodyConstructionInfo &constructionInfo)
setupRigidBody is only used internally by the constructor
btVector3 m_angularFactor
const btCollisionShape * getCollisionShape() const
const btVector3 & getLinearFactor() const
btScalar m_restitution
best simulation results using zero restitution.
void applyCentralForce(const btVector3 &force)
void proceedToTransform(const btTransform &newTrans)
void updateDeactivation(btScalar timeStep)
btScalar m_friction
best simulation results when friction is non-zero
double m_additionalLinearDampingThresholdSqr
btRigidBody(const btRigidBodyConstructionInfo &constructionInfo)
btRigidBody constructor using construction info
btCollisionShape * getCollisionShape()
const btVector3 & getAngularFactor() const
void applyTorque(const btVector3 &torque)
btVector3DoubleData m_totalTorque
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
btVector3 m_angularVelocity
btScalar getInvMass() const
The btMotionState interface class allows the dynamics world to synchronize and interpolate the update...
const btBroadphaseProxy * getBroadphaseProxy() const
btVector3 m_invInertiaLocal
btVector3DoubleData m_totalForce
btCollisionObjectFloatData m_collisionObjectData
float m_angularSleepingThreshold
void saveKinematicState(btScalar step)
btVector3FloatData m_totalTorque
btVector3 getTurnVelocity()
btVector3 can be used to represent 3D points and vectors.
btVector3 m_deltaLinearVelocity
btScalar m_linearSleepingThreshold
const btVector3 & getLinearVelocity() const
btVector3 getVelocityInLocalPoint(const btVector3 &rel_pos) const
btScalar getLinearSleepingThreshold() const
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
void applyDamping(btScalar timeStep)
applyDamping damps the velocity, using the given m_linearDamping and m_angularDamping
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
void addConstraintRef(btTypedConstraint *c)
#define ATTRIBUTE_ALIGNED16(a)
btScalar m_additionalAngularDampingThresholdSqr
int m_updateRevision
internal update revision number. It will be increased when the object changes. This allows some subsy...
void setAngularFactor(btScalar angFac)
void applyPushImpulse(const btVector3 &impulse, const btVector3 &rel_pos)
void applyForce(const btVector3 &force, const btVector3 &rel_pos)
void setAngularVelocity(const btVector3 &ang_vel)
#define SIMD_FORCE_INLINE
void setNewBroadphaseProxy(btBroadphaseProxy *broadphaseProxy)
void applyTorqueTurnImpulse(const btVector3 &torque)
void setMassProps(btScalar mass, const btVector3 &inertia)
btScalar m_additionalDampingFactor
btCollisionShape * m_collisionShape
void applyCentralImpulse(const btVector3 &impulse)
btAlignedObjectArray< btTypedConstraint * > m_constraintRefs
btVector3DoubleData m_linearVelocity
btScalar m_additionalDampingFactor
float m_linearSleepingThreshold
btVector3 m_linearVelocity
void setPushVelocity(const btVector3 &v)
int getInternalType() const
reserved for Bullet internal usage
btVector3 getPushVelocity()
btVector3FloatData m_angularVelocity
double m_additionalAngularDampingFactor
btBroadphaseProxy * m_broadphaseHandle
btMotionState * m_motionState
When a motionState is provided, the rigid body will initialize its world transform from the motion st...
btVector3FloatData m_linearVelocity
btVector3 m_gravity_acceleration
const btMatrix3x3 & getInvInertiaTensorWorld() const
void setInvInertiaDiagLocal(const btVector3 &diagInvInertia)
void setMotionState(btMotionState *motionState)
#define WANTS_DEACTIVATION
void setCenterOfMassTransform(const btTransform &xform)
btTypedConstraint * getConstraintRef(int index)
float m_additionalAngularDampingThresholdSqr
const btVector3 & getCenterOfMassPosition() const
float m_additionalDampingFactor
btScalar m_additionalAngularDampingFactor
btScalar m_rollingFriction
the m_rollingFriction prevents rounded shapes, such as spheres, cylinders and capsules from rolling f...
btVector3 m_deltaAngularVelocity
static btRigidBody * upcast(btCollisionObject *colObj)
The btRigidBodyConstructionInfo structure provides information to create a rigid body.
const btMotionState * getMotionState() const
btMatrix3x3FloatData m_invInertiaTensorWorld
void setTurnVelocity(const btVector3 &v)
const btVector3 & getTotalForce() const
void applyImpulse(const btVector3 &impulse, const btVector3 &rel_pos)
btScalar m_additionalAngularDampingFactor
btVector3FloatData m_gravity_acceleration
btVector3DoubleData m_gravity
double m_additionalDampingFactor
btScalar computeImpulseDenominator(const btVector3 &pos, const btVector3 &normal) const
void applyCentralPushImpulse(const btVector3 &impulse)
btRigidBodyConstructionInfo(btScalar mass, btMotionState *motionState, btCollisionShape *collisionShape, const btVector3 &localInertia=btVector3(0, 0, 0))
void removeConstraintRef(btTypedConstraint *c)
const btVector3 & getGravity() const
static const btRigidBody * upcast(const btCollisionObject *colObj)
to keep collision detection and dynamics separate we don't store a rigidbody pointer but a rigidbody ...
btScalar m_linearSleepingThreshold
btScalar computeAngularImpulseDenominator(const btVector3 &axis) const
btMotionState * getMotionState()
void setActivationState(int newState) const
int size() const
return the number of elements in the array
btVector3DoubleData m_linearFactor
btVector3DoubleData m_angularVelocity
btVector3 computeGyroscopicImpulseImplicit_Body(btScalar step) const
perform implicit force computation in body space (inertial frame)
btVector3 getLocalInertia() const