allow single raycast to be performed on objects

This commit is contained in:
ejcoumans
2007-02-14 04:09:17 +00:00
parent 4d6ec84630
commit 9b94416d61
2 changed files with 4 additions and 1 deletions

View File

@@ -178,6 +178,8 @@ void btCollisionWorld::removeCollisionObject(btCollisionObject* collisionObject)
} }
} }
void btCollisionWorld::rayTestSingle(const btTransform& rayFromTrans,const btTransform& rayToTrans, void btCollisionWorld::rayTestSingle(const btTransform& rayFromTrans,const btTransform& rayToTrans,
btCollisionObject* collisionObject, btCollisionObject* collisionObject,
const btCollisionShape* collisionShape, const btCollisionShape* collisionShape,
@@ -186,6 +188,7 @@ void btCollisionWorld::rayTestSingle(const btTransform& rayFromTrans,const btTra
{ {
btSphereShape pointShape(btScalar(0.0)); btSphereShape pointShape(btScalar(0.0));
pointShape.setMargin(0.f);
if (collisionShape->isConvex()) if (collisionShape->isConvex())
{ {

View File

@@ -216,7 +216,7 @@ public:
/// rayTestSingle performs a raycast call and calls the resultCallback. It is used internally by rayTest. /// rayTestSingle performs a raycast call and calls the resultCallback. It is used internally by rayTest.
/// In a future implementation, we consider moving the ray test as a virtual method in btCollisionShape. /// In a future implementation, we consider moving the ray test as a virtual method in btCollisionShape.
/// This allows more customization. /// This allows more customization.
void rayTestSingle(const btTransform& rayFromTrans,const btTransform& rayToTrans, static void rayTestSingle(const btTransform& rayFromTrans,const btTransform& rayToTrans,
btCollisionObject* collisionObject, btCollisionObject* collisionObject,
const btCollisionShape* collisionShape, const btCollisionShape* collisionShape,
const btTransform& colObjWorldTransform, const btTransform& colObjWorldTransform,