applied patches from Marten (Starbreeze) for per-rigidbody sleeping thresholds, access to constraint references.

Also added assert, to make sure users don't delete rigidbodies while constraints point to them.
This commit is contained in:
ejcoumans
2007-07-26 00:16:06 +00:00
parent 9803a78140
commit bf967a458a
3 changed files with 39 additions and 4 deletions

View File

@@ -39,6 +39,8 @@ btRigidBody::btRigidBody(btScalar mass, btMotionState* motionState, btCollisionS
m_totalTorque(btScalar(0.0), btScalar(0.0), btScalar(0.0)),
m_linearDamping(btScalar(0.)),
m_angularDamping(btScalar(0.5)),
m_linearSleepingThreshold(gLinearSleepingThreshold),
m_angularSleepingThreshold(gAngularSleepingThreshold),
m_optionalMotionState(motionState),
m_contactSolverType(0),
m_frictionSolverType(0)
@@ -79,12 +81,15 @@ btRigidBody::btRigidBody( btScalar mass,const btTransform& worldTransform,btColl
m_totalForce(btScalar(0.0), btScalar(0.0), btScalar(0.0)),
m_totalTorque(btScalar(0.0), btScalar(0.0), btScalar(0.0)),
m_linearVelocity(btScalar(0.0), btScalar(0.0), btScalar(0.0)),
m_angularVelocity(btScalar(0.),btScalar(0.),btScalar(0.)),
m_angularVelocity(btScalar(0.),btScalar(0.),btScalar(0.)),
m_linearSleepingThreshold(gLinearSleepingThreshold),
m_angularSleepingThreshold(gAngularSleepingThreshold),
m_linearDamping(btScalar(0.)),
m_angularDamping(btScalar(0.5)),
m_optionalMotionState(0),
m_contactSolverType(0),
m_frictionSolverType(0)
{
m_worldTransform = worldTransform;