Blender V2.61 - r43446
|
#include <btSphereBoxCollisionAlgorithm.h>
Classes | |
struct | CreateFunc |
Public Member Functions | |
btSphereBoxCollisionAlgorithm (btPersistentManifold *mf, const btCollisionAlgorithmConstructionInfo &ci, btCollisionObject *col0, btCollisionObject *col1, bool isSwapped) | |
virtual | ~btSphereBoxCollisionAlgorithm () |
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) |
btScalar | getSphereDistance (btCollisionObject *boxObj, btVector3 &v3PointOnBox, btVector3 &v3PointOnSphere, const btVector3 &v3SphereCenter, btScalar fRadius) |
btScalar | getSpherePenetration (btCollisionObject *boxObj, btVector3 &v3PointOnBox, btVector3 &v3PointOnSphere, const btVector3 &v3SphereCenter, btScalar fRadius, const btVector3 &aabbMin, const btVector3 &aabbMax) |
btSphereBoxCollisionAlgorithm provides sphere-box collision detection. Other features are frame-coherency (persistent data) and collision response.
Definition at line 29 of file btSphereBoxCollisionAlgorithm.h.
btSphereBoxCollisionAlgorithm::btSphereBoxCollisionAlgorithm | ( | btPersistentManifold * | mf, |
const btCollisionAlgorithmConstructionInfo & | ci, | ||
btCollisionObject * | col0, | ||
btCollisionObject * | col1, | ||
bool | isSwapped | ||
) |
Definition at line 23 of file btSphereBoxCollisionAlgorithm.cpp.
References btDispatcher::getNewManifold(), btCollisionAlgorithm::m_dispatcher, and btDispatcher::needsCollision().
Referenced by btSphereBoxCollisionAlgorithm::CreateFunc::CreateCollisionAlgorithm().
btSphereBoxCollisionAlgorithm::~btSphereBoxCollisionAlgorithm | ( | ) | [virtual] |
Definition at line 40 of file btSphereBoxCollisionAlgorithm.cpp.
References btCollisionAlgorithm::m_dispatcher, and btDispatcher::releaseManifold().
btScalar btSphereBoxCollisionAlgorithm::calculateTimeOfImpact | ( | btCollisionObject * | body0, |
btCollisionObject * | body1, | ||
const btDispatcherInfo & | dispatchInfo, | ||
btManifoldResult * | resultOut | ||
) | [virtual] |
Implements btCollisionAlgorithm.
Definition at line 93 of file btSphereBoxCollisionAlgorithm.cpp.
virtual void btSphereBoxCollisionAlgorithm::getAllContactManifolds | ( | btManifoldArray & | manifoldArray | ) | [inline, virtual] |
Implements btCollisionAlgorithm.
Definition at line 45 of file btSphereBoxCollisionAlgorithm.h.
References btAlignedObjectArray< T >::push_back().
btScalar btSphereBoxCollisionAlgorithm::getSphereDistance | ( | btCollisionObject * | boxObj, |
btVector3 & | v3PointOnBox, | ||
btVector3 & | v3PointOnSphere, | ||
const btVector3 & | v3SphereCenter, | ||
btScalar | fRadius | ||
) |
Definition at line 105 of file btSphereBoxCollisionAlgorithm.cpp.
References bounds(), btSqrt(), dot(), btBoxShape::getHalfExtentsWithoutMargin(), btConvexInternalShape::getMargin(), getSpherePenetration(), i, btTransform::invXform(), normalize(), and SIMD_EPSILON.
Referenced by processCollision().
btScalar btSphereBoxCollisionAlgorithm::getSpherePenetration | ( | btCollisionObject * | boxObj, |
btVector3 & | v3PointOnBox, | ||
btVector3 & | v3PointOnSphere, | ||
const btVector3 & | v3SphereCenter, | ||
btScalar | fRadius, | ||
const btVector3 & | aabbMin, | ||
const btVector3 & | aabbMax | ||
) |
Definition at line 208 of file btSphereBoxCollisionAlgorithm.cpp.
References bounds(), dot(), i, btTransform::invXform(), and normalize().
Referenced by getSphereDistance().
void btSphereBoxCollisionAlgorithm::processCollision | ( | btCollisionObject * | body0, |
btCollisionObject * | body1, | ||
const btDispatcherInfo & | dispatchInfo, | ||
btManifoldResult * | resultOut | ||
) | [virtual] |
report a contact. internally this will be kept persistent, and contact reduction is done
Implements btCollisionAlgorithm.
Definition at line 51 of file btSphereBoxCollisionAlgorithm.cpp.
References btManifoldResult::addContactPoint(), getSphereDistance(), normalize(), btManifoldResult::refreshContactPoints(), btManifoldResult::setPersistentManifold(), and SIMD_EPSILON.