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