139#ifdef BT_USE_OLD_DAMPING_METHOD
154#ifdef BT_USE_OLD_DAMPING_METHOD
192 if (angSpeed > angDampVel)
267 const btVector3 w2 = I * w1 + w1.
cross(I * w1) * dt - (T * dt + I * w0);
279 const btMatrix3x3 dfw1 = I + (w1x * I - Iw1x) * dt;
290 if (l2 > maxGyroscopicForce * maxGyroscopicForce)
329 omegab = omegab - omega_div;
380#define MAX_ANGVEL SIMD_HALF_PI
387 #if defined(BT_CLAMP_VELOCITY_TO) && BT_CLAMP_VELOCITY_TO > 0
493#ifdef BT_USE_DOUBLE_PRECISION
494 memset(rbd->m_padding, 0,
sizeof(rbd->m_padding));
const T & btClamped(const T &a, const T &lb, const T &ub)
const T & btMax(const T &a, const T &b)
btVector3 quatRotate(const btQuaternion &rotation, const btVector3 &v)
bool gDisableDeactivation
btVector3 evalEulerEqn(const btVector3 &w1, const btVector3 &w0, const btVector3 &T, const btScalar dt, const btMatrix3x3 &I)
btScalar gDeactivationTime
btMatrix3x3 evalEulerEqnDeriv(const btVector3 &w1, const btVector3 &w0, const btScalar dt, const btMatrix3x3 &I)
#define btRigidBodyDataName
@ BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_BODY
btScalar btPow(btScalar x, btScalar y)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
btScalar btSqrt(btScalar y)
#define BT_RIGIDBODY_CODE
int size() const
return the number of elements in the array
int findLinearSearch(const T &key) const
void remove(const T &key)
void push_back(const T &_Val)
btCollisionObject can be used to manage collision detection objects.
bool isStaticOrKinematicObject() const
virtual const char * serialize(void *dataBuffer, class btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
btTransform & getWorldTransform()
btTransform m_worldTransform
virtual void setCollisionShape(btCollisionShape *collisionShape)
btVector3 m_interpolationLinearVelocity
void setIgnoreCollisionCheck(const btCollisionObject *co, bool ignoreCollisionCheck)
btVector3 m_interpolationAngularVelocity
int m_internalType
m_internalType is reserved to distinguish Bullet's btCollisionObject, btRigidBody,...
btTransform m_interpolationWorldTransform
m_interpolationWorldTransform is used for CCD and interpolation it can be either previous or future (...
bool isKinematicObject() const
virtual ~btCollisionObject()
btScalar m_spinningFriction
btScalar m_rollingFriction
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
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.
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
btVector3 solve33(const btVector3 &b) const
Solve A * x = b, where b is a column vector.
btMatrix3x3 transpose() const
Return the transpose of the matrix.
void getRotation(btQuaternion &q) const
Get the matrix represented as a quaternion.
btMatrix3x3 scaled(const btVector3 &s) const
Create a scaled copy of the matrix.
void serialize(struct btMatrix3x3Data &dataOut) const
void setValue(const btScalar &xx, const btScalar &xy, const btScalar &xz, const btScalar &yx, const btScalar &yy, const btScalar &yz, const btScalar &zx, const btScalar &zy, const btScalar &zz)
Set the values of the matrix explicitly (row major)
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...
btQuaternion inverse() const
Return the inverse of this quaternion.
void getAabb(btVector3 &aabbMin, btVector3 &aabbMax) const
btScalar m_additionalAngularDampingFactor
void integrateVelocities(btScalar step)
void addConstraintRef(btTypedConstraint *c)
virtual void serializeSingleObject(class btSerializer *serializer) const
btMatrix3x3 m_invInertiaTensorWorld
btVector3 m_invInertiaLocal
void applyDamping(btScalar timeStep)
applyDamping damps the velocity, using the given m_linearDamping and m_angularDamping
btMotionState * m_optionalMotionState
void applyCentralForce(const btVector3 &force)
virtual const char * serialize(void *dataBuffer, class btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
btScalar m_additionalDampingFactor
virtual int calculateSerializeBufferSize() const
btScalar m_additionalAngularDampingThresholdSqr
void setGravity(const btVector3 &acceleration)
btRigidBody(const btRigidBodyConstructionInfo &constructionInfo)
btRigidBody constructor using construction info
btScalar m_linearSleepingThreshold
btQuaternion getOrientation() const
void proceedToTransform(const btTransform &newTrans)
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)
const btVector3 & getAngularVelocity() const
btMotionState * getMotionState()
btScalar m_angularDamping
void removeConstraintRef(btTypedConstraint *c)
void setMassProps(btScalar mass, const btVector3 &inertia)
btVector3 m_deltaAngularVelocity
btScalar m_angularSleepingThreshold
btScalar m_additionalLinearDampingThresholdSqr
btVector3 m_linearVelocity
void setDamping(btScalar lin_damping, btScalar ang_damping)
btVector3 m_deltaLinearVelocity
btVector3 m_angularVelocity
void setupRigidBody(const btRigidBodyConstructionInfo &constructionInfo)
setupRigidBody is only used internally by the constructor
void setCenterOfMassTransform(const btTransform &xform)
btAlignedObjectArray< btTypedConstraint * > m_constraintRefs
void updateInertiaTensor()
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
virtual btChunk * allocate(size_t size, int numElements)=0
virtual void finalizeChunk(btChunk *chunk, const char *structType, int chunkCode, void *oldPtr)=0
TypedConstraint is the baseclass for Bullet constraints and vehicles.
const btRigidBody & getRigidBodyA() const
const btRigidBody & getRigidBodyB() const
btVector3 can be used to represent 3D points and vectors.
const btScalar & z() const
Return the z value.
btScalar length() const
Return the length of the vector.
btVector3 cross(const btVector3 &v) const
Return the cross product between this and another vector.
void getSkewSymmetricMatrix(btVector3 *v0, btVector3 *v1, btVector3 *v2) const
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
btVector3 normalized() const
Return a normalized version of this vector.
btScalar length2() const
Return the length of the vector squared.
const btScalar & x() const
Return the x value.
void serialize(struct btVector3Data &dataOut) const
const btScalar & y() const
Return the y value.
The btRigidBodyConstructionInfo structure provides information to create a rigid body.
btScalar m_friction
best simulation results when friction is non-zero
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