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:
@@ -15,7 +15,12 @@ FIND_PATH(MAYA_BASE_DIR include/maya/MFn.h PATH
|
|||||||
/usr/autodesk/maya
|
/usr/autodesk/maya
|
||||||
"C:/Program Files/Autodesk/Maya2008"
|
"C:/Program Files/Autodesk/Maya2008"
|
||||||
"C:/Program Files/Autodesk/Maya2009"
|
"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_INC_DIR ${MAYA_BASE_DIR}/include)
|
||||||
SET(MAYA_LIB_DIR ${MAYA_BASE_DIR}/lib)
|
SET(MAYA_LIB_DIR ${MAYA_BASE_DIR}/lib)
|
||||||
@@ -82,3 +87,6 @@ ENDIF(WIN32)
|
|||||||
# ENDIF (WIN32)
|
# ENDIF (WIN32)
|
||||||
#ENDIF (BUILD_STANDALONE)
|
#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()
|
||||||
@@ -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
|
class DebugDrawcallback : public btTriangleCallback, public btInternalTriangleIndexCallback
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -403,6 +403,11 @@ public:
|
|||||||
///it reports one or more contact points for every overlapping object (including the one with deepest penetration)
|
///it reports one or more contact points for every overlapping object (including the one with deepest penetration)
|
||||||
void contactTest(btCollisionObject* colObj, ContactResultCallback& resultCallback);
|
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.
|
/// 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.
|
||||||
|
|||||||
Reference in New Issue
Block a user