another large series of changes, related to the refactoring.

CompoundShapes are tricky to manage with respect to persistent contact points and swapped order of btCollisionObjects,
During dispatch, finding an algorith etc. order can be swapped.
fixed several other issues, related to SimpleBroadphase (removing a proxy was not working)
This commit is contained in:
ejcoumans
2006-10-06 05:22:13 +00:00
parent 97b287a6bc
commit bf847b839a
54 changed files with 1852 additions and 1946 deletions

View File

@@ -43,9 +43,10 @@ struct btCollisionObject
enum CollisionFlags
{
isStatic = 1,
noContactResponse = 2,
customMaterialCallback = 4,//this allows per-triangle material (friction/restitution)
CF_STATIC_OBJECT= 1,
CF_KINEMATIC_OJBECT= 2,
CF_NO_CONTACT_RESPONSE = 4,
CF_CUSTOM_MATERIAL_CALLBACK = 8,//this allows per-triangle material (friction/restitution)
};
@@ -75,14 +76,24 @@ struct btCollisionObject
/// Don't do continuous collision detection if square motion (in one step) is less then m_ccdSquareMotionTreshold
float m_ccdSquareMotionTreshold;
bool mergesSimulationIslands() const;
inline bool IsStatic() const {
return m_collisionFlags & isStatic;
inline bool mergesSimulationIslands() const
{
//static objects, kinematic and object without contact response don't merge islands
return !(m_collisionFlags & (CF_STATIC_OBJECT | CF_KINEMATIC_OJBECT | CF_NO_CONTACT_RESPONSE) );
}
inline bool HasContactResponse() {
return !(m_collisionFlags & noContactResponse);
inline bool isStaticObject() const {
return m_collisionFlags & CF_STATIC_OBJECT;
}
inline bool isKinematicObject() const
{
return m_collisionFlags & CF_KINEMATIC_OJBECT;
}
inline bool hasContactResponse() const {
return !(m_collisionFlags & CF_NO_CONTACT_RESPONSE);
}