Add pairwise collision test:

void	btCollisionWorld::contactPairTest(btCollisionObject* colObjA, btCollisionObject* colObjB, ContactResultCallback& resultCallback)

cmake: improve feedback for Maya Plugin handling if the Maya base path is not detected
This commit is contained in:
erwin.coumans 2010-02-11 09:18:49 +00:00
parent 5907f81774
commit 7a175fb65e
3 changed files with 87 additions and 55 deletions

View File

@ -15,7 +15,12 @@ FIND_PATH(MAYA_BASE_DIR include/maya/MFn.h PATH
/usr/autodesk/maya
"C:/Program Files/Autodesk/Maya2008"
"C:/Program Files/Autodesk/Maya2009"
"C:/Program Files/Autodesk/Maya8.5")
"C:/Program Files/Autodesk/Maya8.5"
"C:/Program Files (x86)/Autodesk/Maya2010"
)
IF (MAYA_BASE_DIR)
message ("Maya found at location " ${MAYA_BASE_DIR})
SET(MAYA_INC_DIR ${MAYA_BASE_DIR}/include)
SET(MAYA_LIB_DIR ${MAYA_BASE_DIR}/lib)
@ -82,3 +87,6 @@ ENDIF(WIN32)
# ENDIF (WIN32)
#ENDIF (BUILD_STANDALONE)
ELSE()
MESSAGE("Maya not found, try adding your Maya path in Bullet/Extras/MayaPlugin/CMakeListst.txt under FIND_PATH(MAYA_BASE_DIR ...")
ENDIF()

View File

@ -1017,6 +1017,25 @@ void btCollisionWorld::contactTest( btCollisionObject* colObj, ContactResultCall
}
///contactTest performs a discrete collision test between two collision objects and calls the resultCallback if overlap if detected.
///it reports one or more contact points (including the one with deepest penetration)
void btCollisionWorld::contactPairTest(btCollisionObject* colObjA, btCollisionObject* colObjB, ContactResultCallback& resultCallback)
{
btCollisionAlgorithm* algorithm = getDispatcher()->findAlgorithm(colObjA,colObjB);
if (algorithm)
{
btBridgedManifoldResult contactPointResult(colObjA,colObjB, resultCallback);
//discrete collision detection query
algorithm->processCollision(colObjA,colObjB, getDispatchInfo(),&contactPointResult);
algorithm->~btCollisionAlgorithm();
getDispatcher()->freeCollisionAlgorithm(algorithm);
}
}
class DebugDrawcallback : public btTriangleCallback, public btInternalTriangleIndexCallback
{

View File

@ -403,6 +403,11 @@ public:
///it reports one or more contact points for every overlapping object (including the one with deepest penetration)
void contactTest(btCollisionObject* colObj, ContactResultCallback& resultCallback);
///contactTest performs a discrete collision test between two collision objects and calls the resultCallback if overlap if detected.
///it reports one or more contact points (including the one with deepest penetration)
void contactPairTest(btCollisionObject* colObjA, btCollisionObject* colObjB, ContactResultCallback& resultCallback);
/// 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.
/// This allows more customization.