added patch from Marten Svanfeld to pass collision filter group/mask in addRigidbody.
This commit is contained in:
@@ -6,18 +6,16 @@ SubDir TOP Demos EPAPenDepthDemo ;
|
||||
|
||||
{
|
||||
Application $(<) : $(>) : noinstall console nomanifest ;
|
||||
LinkWith $(<) : GIMPACTBullet GIMPACT bulletopenglsupport bulletdynamics bulletcollision bulletmath ;
|
||||
LinkWith $(<) : GIMPACT bulletopenglsupport bulletdynamics bulletcollision bulletmath ;
|
||||
CFlags $(<) :
|
||||
[ FIncludes $(TOP)/Demos/OpenGL ]
|
||||
[ FIncludes $(TOP)/Extras/GIMPACT/include ]
|
||||
[ FIncludes $(TOP)/Extras/GIMPACTBullet ]
|
||||
|
||||
;
|
||||
|
||||
MsvcIncDirs $(<) :
|
||||
"../../Demos/OpenGL"
|
||||
"../../Extras/GIMPACT/include"
|
||||
"../../Extras/GIMPACTBullet" ;
|
||||
"../../Extras/GIMPACT/include" ;
|
||||
}
|
||||
|
||||
ExtraDemo4 EPAPenDepthDemo : [ Wildcard *.h *.cpp ] ;
|
||||
|
||||
@@ -30,6 +30,9 @@ btCollisionObject::btCollisionObject()
|
||||
|
||||
}
|
||||
|
||||
btCollisionObject::~btCollisionObject()
|
||||
{
|
||||
}
|
||||
|
||||
void btCollisionObject::setActivationState(int newState)
|
||||
{
|
||||
|
||||
@@ -126,6 +126,7 @@ public:
|
||||
|
||||
btCollisionObject();
|
||||
|
||||
virtual ~btCollisionObject();
|
||||
|
||||
void setCollisionShape(btCollisionShape* collisionShape)
|
||||
{
|
||||
|
||||
@@ -327,6 +327,19 @@ void btDiscreteDynamicsWorld::addRigidBody(btRigidBody* body)
|
||||
}
|
||||
}
|
||||
|
||||
void btDiscreteDynamicsWorld::addRigidBody(btRigidBody* body, short group, short mask)
|
||||
{
|
||||
if (!body->isStaticOrKinematicObject())
|
||||
{
|
||||
body->setGravity(m_gravity);
|
||||
}
|
||||
|
||||
if (body->getCollisionShape())
|
||||
{
|
||||
addCollisionObject(body,group,mask);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void btDiscreteDynamicsWorld::updateVehicles(btScalar timeStep)
|
||||
{
|
||||
|
||||
@@ -132,6 +132,8 @@ public:
|
||||
|
||||
virtual void addRigidBody(btRigidBody* body);
|
||||
|
||||
virtual void addRigidBody(btRigidBody* body, short group, short mask);
|
||||
|
||||
virtual void removeRigidBody(btRigidBody* body);
|
||||
|
||||
void debugDrawObject(const btTransform& worldTransform, const btCollisionShape* shape, const btVector3& color);
|
||||
|
||||
Reference in New Issue
Block a user