Blender V2.61 - r43446
|
#include <btConvexConvexAlgorithm.h>
Classes | |
struct | CreateFunc |
Public Member Functions | |
btConvexConvexAlgorithm (btPersistentManifold *mf, const btCollisionAlgorithmConstructionInfo &ci, btCollisionObject *body0, btCollisionObject *body1, btSimplexSolverInterface *simplexSolver, btConvexPenetrationDepthSolver *pdSolver, int numPerturbationIterations, int minimumPointsPerturbationThreshold) | |
cache separating vector to speedup collision detection | |
virtual | ~btConvexConvexAlgorithm () |
virtual void | processCollision (btCollisionObject *body0, btCollisionObject *body1, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut) |
virtual btScalar | calculateTimeOfImpact (btCollisionObject *body0, btCollisionObject *body1, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut) |
virtual void | getAllContactManifolds (btManifoldArray &manifoldArray) |
void | setLowLevelOfDetail (bool useLowLevel) |
const btPersistentManifold * | getManifold () |
Enabling USE_SEPDISTANCE_UTIL2 requires 100% reliable distance computation. However, when using large size ratios GJK can be imprecise so the distance is not conservative. In that case, enabling this USE_SEPDISTANCE_UTIL2 would result in failing/missing collisions. Either improve GJK for large size ratios (testing a 100 units versus a 0.1 unit object) or only enable the util for certain pairs that have a small size ratio The convexConvexAlgorithm collision algorithm implements time of impact, convex closest points and penetration depth calculations between two convex objects. Multiple contact points are calculated by perturbing the orientation of the smallest object orthogonal to the separating normal. This idea was described by Gino van den Bergen in this forum topic http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=4&t=288&p=888#p888
Definition at line 40 of file btConvexConvexAlgorithm.h.
btConvexConvexAlgorithm::btConvexConvexAlgorithm | ( | btPersistentManifold * | mf, |
const btCollisionAlgorithmConstructionInfo & | ci, | ||
btCollisionObject * | body0, | ||
btCollisionObject * | body1, | ||
btSimplexSolverInterface * | simplexSolver, | ||
btConvexPenetrationDepthSolver * | pdSolver, | ||
int | numPerturbationIterations, | ||
int | minimumPointsPerturbationThreshold | ||
) |
cache separating vector to speedup collision detection
Definition at line 191 of file btConvexConvexAlgorithm.cpp.
Referenced by btConvexConvexAlgorithm::CreateFunc::CreateCollisionAlgorithm().
btConvexConvexAlgorithm::~btConvexConvexAlgorithm | ( | ) | [virtual] |
Definition at line 212 of file btConvexConvexAlgorithm.cpp.
References btCollisionAlgorithm::m_dispatcher, and btDispatcher::releaseManifold().
btScalar btConvexConvexAlgorithm::calculateTimeOfImpact | ( | btCollisionObject * | body0, |
btCollisionObject * | body1, | ||
const btDispatcherInfo & | dispatchInfo, | ||
btManifoldResult * | resultOut | ||
) | [virtual] |
rather than checking ALL pairs, only calculate TOI when motion exceeds threshold
Linear motion for one of objects needs to exceed m_ccdSquareMotionThreshold col0->m_worldTransform,
Convex0 against sphere for Convex1
Simplification, one object is simplified as a sphere
Sphere (for convex0) against Convex1
Simplification, one object is simplified as a sphere
Implements btCollisionAlgorithm.
Definition at line 486 of file btConvexConvexAlgorithm.cpp.
References btGjkConvexCast::calcTimeOfImpact(), and disableCcd.
virtual void btConvexConvexAlgorithm::getAllContactManifolds | ( | btManifoldArray & | manifoldArray | ) | [inline, virtual] |
should we use m_ownManifold to avoid adding duplicates?
Implements btCollisionAlgorithm.
Definition at line 71 of file btConvexConvexAlgorithm.h.
References btAlignedObjectArray< T >::push_back().
const btPersistentManifold* btConvexConvexAlgorithm::getManifold | ( | ) | [inline] |
Definition at line 82 of file btConvexConvexAlgorithm.h.
void btConvexConvexAlgorithm::processCollision | ( | btCollisionObject * | body0, |
btCollisionObject * | body1, | ||
const btDispatcherInfo & | dispatchInfo, | ||
btManifoldResult * | resultOut | ||
) | [virtual] |
Implements btCollisionAlgorithm.
Definition at line 289 of file btConvexConvexAlgorithm.cpp.
References btManifoldResult::addContactPoint(), BT_LARGE_FLOAT, btAssert, btPlaneSpace1(), CAPSULE_SHAPE_PROXYTYPE, capsuleCapsuleDistance(), btIDebugDraw::drawTransform(), gContactBreakingThreshold, btGjkPairDetector::getCachedSeparatingAxis(), btGjkPairDetector::getCachedSeparatingDistance(), btGjkPairDetector::getClosestPoints(), btCapsuleShape::getHalfHeight(), btConvexInternalShape::getLocalScaling(), btDispatcher::getNewManifold(), btManifoldResult::getPersistentManifold(), btCapsuleShape::getRadius(), btCapsuleShape::getUpAxis(), i, btDispatcherInfo::m_convexConservativeDistanceThreshold, btDispatcherInfo::m_convexMaxDistanceUseCPT, btDispatcherInfo::m_debugDraw, btCollisionAlgorithm::m_dispatcher, btDiscreteCollisionDetectorInterface::ClosestPointInput::m_maximumDistanceSquared, btDiscreteCollisionDetectorInterface::ClosestPointInput::m_stackAlloc, btDispatcherInfo::m_stackAllocator, btDiscreteCollisionDetectorInterface::ClosestPointInput::m_transformA, btDiscreteCollisionDetectorInterface::ClosestPointInput::m_transformB, btDispatcherInfo::m_useConvexConservativeDistanceUtil, btManifoldResult::refreshContactPoints(), btTransform::setBasis(), btGjkPairDetector::setMinkowskiA(), btGjkPairDetector::setMinkowskiB(), btManifoldResult::setPersistentManifold(), SIMD_2_PI, SIMD_EPSILON, and SIMD_PI.
void btConvexConvexAlgorithm::setLowLevelOfDetail | ( | bool | useLowLevel | ) |
Definition at line 221 of file btConvexConvexAlgorithm.cpp.