Thanks to Mårten Svanfeldt for the contribution:

- optionally disable collisions between bodies that are linked with constraints
- improved debug rendering with support for compounds, spheres, capsules
This commit is contained in:
ejcoumans
2007-06-28 19:14:30 +00:00
parent a0c5401033
commit ced94d63bf
9 changed files with 1204 additions and 1037 deletions

View File

@@ -16,6 +16,7 @@ subject to the following restrictions:
#ifndef RIGIDBODY_H
#define RIGIDBODY_H
#include "../../LinearMath/btAlignedObjectArray.h"
#include "../../LinearMath/btPoint3.h"
#include "../../LinearMath/btTransform.h"
#include "../../BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
@@ -23,7 +24,7 @@ subject to the following restrictions:
class btCollisionShape;
class btMotionState;
class btTypedConstraint;
extern btScalar gLinearAirDamping;
@@ -57,6 +58,9 @@ class btRigidBody : public btCollisionObject
//m_optionalMotionState allows to automatic synchronize the world transform for active objects
btMotionState* m_optionalMotionState;
//keep track of typed constraints referencing this rigid body
btAlignedObjectArray<btTypedConstraint*> m_constraintRefs;
public:
#ifdef OBSOLETE_MOTIONSTATE_LESS
@@ -339,6 +343,11 @@ public:
return (getBroadphaseProxy() != 0);
}
virtual bool checkCollideWithOverride(btCollisionObject* co);
void addConstraintRef(btTypedConstraint* c);
void removeConstraintRef(btTypedConstraint* c);
int m_debugBodyId;
};