Added name fields to Collision Object and Shape.

Added name field to Typed Constraint.
Added accessor for gravity in dynamics world.
This commit is contained in:
johnmccutchan
2008-01-30 01:52:07 +00:00
parent 5c40e615bd
commit 8fff5c54e9
10 changed files with 52 additions and 2 deletions

View File

@@ -69,6 +69,9 @@ protected:
///m_internalOwner is reserved to point to Bullet's btRigidBody. Don't use this, use m_userObjectPointer instead.
void* m_internalOwner;
// setName, getName
char* m_objectName;
///time of impact calculation
btScalar m_hitFraction;
@@ -334,6 +337,18 @@ public:
m_userObjectPointer = userPointer;
}
char* getName () const
{
return m_objectName;
}
/// the user is responsible for the memory management of name
void setName (char* name)
{
m_objectName = name;
}
inline bool checkCollideWith(btCollisionObject* co)
{
if (m_checkCollideWith)