Add flags to btRigidBody to disable world gravity.
Use setFlags/getFlags with BT_DISABLE_WORLD_GRAVITY See http://code.google.com/p/bullet/issues/detail?id=324
This commit is contained in:
@@ -38,6 +38,10 @@ extern bool gDisableDeactivation;
|
||||
#endif //BT_USE_DOUBLE_PRECISION
|
||||
|
||||
|
||||
enum btRigidBodyFlags
|
||||
{
|
||||
BT_DISABLE_WORLD_GRAVITY = 1
|
||||
};
|
||||
|
||||
|
||||
///The btRigidBody is the main class for rigid body objects. It is derived from btCollisionObject, so it keeps a pointer to a btCollisionShape.
|
||||
@@ -83,6 +87,10 @@ class btRigidBody : public btCollisionObject
|
||||
//keep track of typed constraints referencing this rigid body
|
||||
btAlignedObjectArray<btTypedConstraint*> m_constraintRefs;
|
||||
|
||||
int m_rigidbodyFlags;
|
||||
|
||||
int m_debugBodyId;
|
||||
|
||||
public:
|
||||
|
||||
///The btRigidBodyConstructionInfo structure provides information to create a rigid body. Setting mass to zero creates a fixed (non-dynamic) rigid body.
|
||||
@@ -503,7 +511,15 @@ public:
|
||||
return m_constraintRefs.size();
|
||||
}
|
||||
|
||||
int m_debugBodyId;
|
||||
void setFlags(int flags)
|
||||
{
|
||||
m_rigidbodyFlags = flags;
|
||||
}
|
||||
|
||||
int getFlags() const
|
||||
{
|
||||
return m_rigidbodyFlags;
|
||||
}
|
||||
|
||||
virtual int calculateSerializeBufferSize() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user