165 #ifdef USE_OLD_DAMPING_METHOD
186 if (speed < m_linearDamping)
200 if (angSpeed < m_angularDamping)
203 if (angSpeed > angDampVel)
270 if (l2>maxGyroscopicForce*maxGyroscopicForce)
285 #define MAX_ANGVEL SIMD_HALF_PI
290 m_angularVelocity *= (
MAX_ANGVEL/step) /angvel;
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
void push_back(const T &_Val)
void serialize(struct btMatrix3x3Data &dataOut) const
btScalar m_angularSleepingThreshold
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
void predictIntegratedTransform(btScalar step, btTransform &predictedTransform)
continuous collision detection needs prediction
void updateInertiaTensor()
btScalar m_angularDamping
btTransform m_interpolationWorldTransform
m_interpolationWorldTransform is used for CCD and interpolation it can be either previous or future (...
bool gDisableDeactivation
btScalar btSqrt(btScalar y)
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
btScalar gDeactivationTime
btVector3 computeGyroscopicForce(btScalar maxGyroscopicForce) const
btRigidBody(const btRigidBodyConstructionInfo &constructionInfo)
btRigidBody constructor using construction info
void setDamping(btScalar lin_damping, btScalar ang_damping)
btScalar m_angularSleepingThreshold
btScalar m_additionalLinearDampingThresholdSqr
btTransform m_worldTransform
btScalar m_rollingFriction
the m_rollingFriction prevents rounded shapes, such as spheres, cylinders and capsules from rolling f...
virtual void getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const =0
getAabb returns the axis aligned bounding box in the coordinate frame of the given transform t...
const btScalar & x() const
Return the x value.
btScalar m_additionalLinearDampingThresholdSqr
void applyCentralForce(const btVector3 &force)
virtual void setCollisionShape(btCollisionShape *collisionShape)
void integrateVelocities(btScalar step)
virtual int calculateSerializeBufferSize() const
btVector3 m_invInertiaLocal
virtual const char * serialize(void *dataBuffer, class btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
void getRotation(btQuaternion &q) const
Get the matrix represented as a quaternion.
btTransform & getWorldTransform()
btVector3 m_deltaLinearVelocity
int m_internalType
m_internalType is reserved to distinguish Bullet's btCollisionObject, btRigidBody, btSoftBody, btGhostObject etc.
int size() const
return the number of elements in the array
void setupRigidBody(const btRigidBodyConstructionInfo &constructionInfo)
setupRigidBody is only used internally by the constructor
btMatrix3x3 scaled(const btVector3 &s) const
Create a scaled copy of the matrix.
bool isKinematicObject() const
void addConstraintRef(btTypedConstraint *c)
btQuaternion getOrientation() const
const btVector3 & getAngularVelocity() const
btVector3 cross(const btVector3 &v) const
Return the cross product between this and another vector.
btMotionState * m_optionalMotionState
bool isStaticOrKinematicObject() const
void serialize(struct btVector3Data &dataOut) const
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
The btRigidBody is the main class for rigid body objects.
btScalar length() const
Return the length of the vector.
btVector3 m_angularFactor
The btRigidBodyConstructionInfo structure provides information to create a rigid body.
btVector3 m_angularVelocity
void proceedToTransform(const btTransform &newTrans)
#define btRigidBodyDataName
btScalar m_additionalDampingFactor
const btScalar & y() const
Return the y value.
btScalar m_additionalAngularDampingFactor
btTransform m_startWorldTransform
btVector3 m_linearVelocity
btScalar m_rollingFriction
btVector3 can be used to represent 3D points and vectors.
btScalar btPow(btScalar x, btScalar y)
btScalar length2() const
Return the length of the vector squared.
btScalar m_angularDamping
void setCenterOfMassTransform(const btTransform &xform)
void setMassProps(btScalar mass, const btVector3 &inertia)
virtual void finalizeChunk(btChunk *chunk, const char *structType, int chunkCode, void *oldPtr)=0
void applyDamping(btScalar timeStep)
applyDamping damps the velocity, using the given m_linearDamping and m_angularDamping ...
btVector3 normalized() const
Return a normalized version of this vector.
void remove(const T &key)
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)
btVector3 m_interpolationAngularVelocity
int findLinearSearch(const T &key) const
const btRigidBody & getRigidBodyA() const
btMatrix3x3 transpose() const
Return the transpose of the matrix.
#define BT_RIGIDBODY_CODE
btScalar m_linearSleepingThreshold
int m_checkCollideWith
If some object should have elaborate collision filtering by sub-classes.
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)
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
The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatr...
btCollisionShape * m_collisionShape
btAlignedObjectArray< btTypedConstraint * > m_constraintRefs
btVector3 m_interpolationLinearVelocity
void removeConstraintRef(btTypedConstraint *c)
btVector3 m_deltaAngularVelocity
const T & btClamped(const T &a, const T &lb, const T &ub)
const btRigidBody & getRigidBodyB() const
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 btChunk * allocate(size_t size, int numElements)=0
virtual void getWorldTransform(btTransform &worldTrans) const =0
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
const btScalar & z() const
Return the z value.
btMatrix3x3 m_invInertiaTensorWorld
void setGravity(const btVector3 &acceleration)