167 #ifdef USE_OLD_DAMPING_METHOD 188 if (speed < m_linearDamping)
202 if (angSpeed < m_angularDamping)
205 if (angSpeed > angDampVel)
301 if (l2>maxGyroscopicForce*maxGyroscopicForce)
328 omegab.getSkewSymmetricMatrix(&skew0[0], &skew0[1], &skew0[2]);
341 omegab = omegab - omega_div;
395 #define MAX_ANGVEL SIMD_HALF_PI 400 m_angularVelocity *= (
MAX_ANGVEL/step) /angvel;
511 #ifdef BT_USE_DOUBLE_PRECISION 512 memset(rbd->m_padding, 0,
sizeof(rbd->m_padding));
btScalar m_additionalDampingFactor
void push_back(const T &_Val)
void getAabb(btVector3 &aabbMin, btVector3 &aabbMax) const
void serialize(struct btMatrix3x3Data &dataOut) const
const btVector3 & getAngularVelocity() const
virtual const char * serialize(void *dataBuffer, class btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
btScalar m_angularSleepingThreshold
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
btVector3 solve33(const btVector3 &b) const
Solve A * x = b, where b is a column vector.
btVector3 computeGyroscopicForceExplicit(btScalar maxGyroscopicForce) const
explicit version is best avoided, it gains energy
void predictIntegratedTransform(btScalar step, btTransform &predictedTransform)
continuous collision detection needs prediction
void updateInertiaTensor()
btScalar m_angularDamping
int findLinearSearch(const T &key) const
btVector3 evalEulerEqn(const btVector3 &w1, const btVector3 &w0, const btVector3 &T, const btScalar dt, const btMatrix3x3 &I)
btTransform m_interpolationWorldTransform
m_interpolationWorldTransform is used for CCD and interpolation it can be either previous or future (...
btScalar length2() const
Return the length of the vector squared.
bool gDisableDeactivation
const btRigidBody & getRigidBodyA() const
virtual int calculateSerializeBufferSize() const
btScalar btSqrt(btScalar y)
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
bool isKinematicObject() const
btScalar gDeactivationTime
btRigidBody(const btRigidBodyConstructionInfo &constructionInfo)
btRigidBody constructor using construction info
void setDamping(btScalar lin_damping, btScalar ang_damping)
btScalar m_angularSleepingThreshold
btQuaternion getOrientation() const
const btRigidBody & getRigidBodyB() const
btScalar m_additionalLinearDampingThresholdSqr
btScalar m_spinningFriction
btTransform m_worldTransform
bool isStaticOrKinematicObject() const
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...
void setIgnoreCollisionCheck(const btCollisionObject *co, bool ignoreCollisionCheck)
const btCollisionShape * getCollisionShape() const
btVector3 quatRotate(const btQuaternion &rotation, const btVector3 &v)
btVector3 normalized() const
Return a normalized version of this vector.
btScalar m_additionalLinearDampingThresholdSqr
void applyCentralForce(const btVector3 &force)
btMatrix3x3 transpose() const
Return the transpose of the matrix.
virtual void setCollisionShape(btCollisionShape *collisionShape)
void integrateVelocities(btScalar step)
btVector3 m_invInertiaLocal
btQuaternion inverse() const
Return the inverse of this quaternion.
btVector3 computeGyroscopicImpulseImplicit_World(btScalar dt) const
perform implicit force computation in world space
btTransform & getWorldTransform()
btVector3 m_deltaLinearVelocity
int m_internalType
m_internalType is reserved to distinguish Bullet's btCollisionObject, btRigidBody, btSoftBody, btGhostObject etc.
const btVector3 & getLinearVelocity() const
void setupRigidBody(const btRigidBodyConstructionInfo &constructionInfo)
setupRigidBody is only used internally by the constructor
const btScalar & x() const
Return the x value.
void addConstraintRef(btTypedConstraint *c)
btVector3 cross(const btVector3 &v) const
Return the cross product between this and another vector.
void getSkewSymmetricMatrix(btVector3 *v0, btVector3 *v1, btVector3 *v2) const
btMotionState * m_optionalMotionState
btScalar m_restitution
best simulation results using zero restitution.
btMatrix3x3 scaled(const btVector3 &s) const
Create a scaled copy of the matrix.
btCollisionObject can be used to manage collision detection objects.
btScalar m_linearSleepingThreshold
const btScalar & y() const
Return the y value.
const btScalar & z() const
Return the z value.
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)
btVector3 m_angularFactor
btMatrix3x3 evalEulerEqnDeriv(const btVector3 &w1, const btVector3 &w0, const btScalar dt, const btMatrix3x3 &I)
The btRigidBodyConstructionInfo structure provides information to create a rigid body.
btVector3 m_angularVelocity
void proceedToTransform(const btTransform &newTrans)
#define btRigidBodyDataName
btScalar m_additionalDampingFactor
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)
int size() const
return the number of elements in the array
btScalar m_angularDamping
void serialize(struct btVector3Data &dataOut) const
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 ...
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
#define BT_RIGIDBODY_CODE
btScalar m_linearSleepingThreshold
btScalar m_additionalAngularDampingThresholdSqr
btScalar m_spinningFriction
btScalar m_additionalAngularDampingThresholdSqr
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
btMotionState * getMotionState()
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)
btMotionState * m_motionState
When a motionState is provided, the rigid body will initialize its world transform from the motion st...
void getRotation(btQuaternion &q) const
Get the matrix represented as a quaternion.
btScalar m_friction
best simulation results when friction is non-zero
virtual btChunk * allocate(size_t size, int numElements)=0
btVector3 computeGyroscopicImpulseImplicit_Body(btScalar step) const
perform implicit force computation in body space (inertial frame)
virtual const char * serialize(void *dataBuffer, class btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
virtual void serializeSingleObject(class btSerializer *serializer) const
btVector3 getLocalInertia() const
virtual void getWorldTransform(btTransform &worldTrans) const =0
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
btScalar length() const
Return the length of the vector.
btMatrix3x3 m_invInertiaTensorWorld
void setGravity(const btVector3 &acceleration)