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));
const btCollisionShape * getCollisionShape() const
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
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 (...
btVector3 computeGyroscopicImpulseImplicit_World(btScalar dt) const
perform implicit force computation in world space
bool gDisableDeactivation
btScalar btSqrt(btScalar y)
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
btScalar gDeactivationTime
btRigidBody(const btRigidBodyConstructionInfo &constructionInfo)
btRigidBody constructor using construction info
void setDamping(btScalar lin_damping, btScalar ang_damping)
btScalar m_angularSleepingThreshold
btScalar m_additionalLinearDampingThresholdSqr
btScalar m_spinningFriction
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...
void setIgnoreCollisionCheck(const btCollisionObject *co, bool ignoreCollisionCheck)
const btScalar & x() const
Return the x value.
btVector3 quatRotate(const btQuaternion &rotation, const btVector3 &v)
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 computeGyroscopicForceExplicit(btScalar maxGyroscopicForce) const
explicit version is best avoided, it gains energy
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.
btCollisionObject can be used to manage collision detection objects.
btScalar m_linearSleepingThreshold
virtual void serializeSingleObject(class btSerializer *serializer) 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)
btQuaternion inverse() const
Return the inverse of this quaternion.
btVector3 solve33(const btVector3 &b) const
Solve A * x = b, where b is a column vector.
btScalar length() const
Return the length of the vector.
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
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.
btVector3 getLocalInertia() const
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
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_spinningFriction
btScalar m_additionalAngularDampingThresholdSqr
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
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
btVector3 computeGyroscopicImpulseImplicit_Body(btScalar step) const
perform implicit force computation in body space (inertial frame)
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
void getSkewSymmetricMatrix(btVector3 *v0, btVector3 *v1, btVector3 *v2) 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...
const btScalar & z() const
Return the z value.
btMatrix3x3 m_invInertiaTensorWorld
void setGravity(const btVector3 &acceleration)