allow single raycast to be performed on objects
This commit is contained in:
@@ -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())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user