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