78 if (
denom == 0.0f ) {
222void btConvexConvexAlgorithm ::setLowLevelOfDetail(
bool useLowLevel)
297 m_ownManifold =
true;
299 resultOut->setPersistentManifold(m_manifoldPtr);
310#ifndef BT_DISABLE_CAPSULE_CAPSULE_COLLIDER
381#ifdef USE_SEPDISTANCE_UTIL2
400#ifdef USE_SEPDISTANCE_UTIL2
412 input.m_maximumDistanceSquared =
min0->getMargin() +
min1->getMargin() + m_manifoldPtr->getContactBreakingThreshold()+
resultOut->m_closestPointDistanceThreshold;
415 input.m_maximumDistanceSquared*=
input.m_maximumDistanceSquared;
425#ifdef USE_SEPDISTANCE_UTIL2
439 if (
min0->isPolyhedral() &&
min1->isPolyhedral())
548 worldVertsB1.resize(0);
575 btScalar threshold = m_manifoldPtr->getContactBreakingThreshold();
615 worldVertsB2.resize(0);
639 if (m_numPerturbationIterations &&
resultOut->getPersistentManifold()->getNumContacts() < m_minimumPointsPerturbationThreshold)
680 for ( i=0;i<m_numPerturbationIterations;i++)
693 #ifdef DEBUG_CONTACTS
700 #ifdef DEBUG_CONTACTS
714#ifdef USE_SEPDISTANCE_UTIL2
774 if (
ccd1.calcTimeOfImpact(
col0->getWorldTransform(),
col0->getInterpolationWorldTransform(),
775 col1->getWorldTransform(),
col1->getInterpolationWorldTransform(),
result))
780 if (
col0->getHitFraction()>
result.m_fraction)
783 if (
col1->getHitFraction() >
result.m_fraction)
807 if (
ccd1.calcTimeOfImpact(
col0->getWorldTransform(),
col0->getInterpolationWorldTransform(),
808 col1->getWorldTransform(),
col1->getInterpolationWorldTransform(),
result))
813 if (
col0->getHitFraction() >
result.m_fraction)
816 if (
col1->getHitFraction() >
result.m_fraction)
@ TRIANGLE_SHAPE_PROXYTYPE
@ CAPSULE_SHAPE_PROXYTYPE
static btScalar capsuleCapsuleDistance(btVector3 &normalOnB, btVector3 &pointOnB, btScalar capsuleLengthA, btScalar capsuleRadiusA, btScalar capsuleLengthB, btScalar capsuleRadiusB, int capsuleAxisA, int capsuleAxisB, const btTransform &transformA, const btTransform &transformB, btScalar distanceThreshold)
static void segmentsClosestPoints(btVector3 &ptsVector, btVector3 &offsetA, btVector3 &offsetB, btScalar &tA, btScalar &tB, const btVector3 &translation, const btVector3 &dirA, btScalar hlenA, const btVector3 &dirB, btScalar hlenB)
Specialized capsule-capsule collision algorithm has been added for Bullet 2.75 release to increase ra...
btScalar gContactBreakingThreshold
const T & btMax(const T &a, const T &b)
btScalar dot(const btQuaternion &q1, const btQuaternion &q2)
Calculate the dot product between two quaternions.
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
#define SIMD_FORCE_INLINE
void btPlaneSpace1(const T &n, T &p, T &q)
btScalar btDot(const btVector3 &v1, const btVector3 &v2)
Return the dot product between two vectors.
This class is not enabled yet (work-in-progress) to more aggressively activate objects.
void push_back(const T &_Val)
The btCapsuleShape represents a capsule around the Y axis, there is also the btCapsuleShapeX aligned ...
btDispatcher * m_dispatcher
btCollisionObject can be used to manage collision detection objects.
virtual btScalar getContactBreakingThreshold(btScalar defaultContactThresholdFactor) const
btPersistentManifold * m_manifoldPtr
virtual ~btConvexConvexAlgorithm()
btConvexPenetrationDepthSolver * m_pdSolver
virtual btScalar calculateTimeOfImpact(btCollisionObject *body0, btCollisionObject *body1, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
btConvexConvexAlgorithm(btPersistentManifold *mf, const btCollisionAlgorithmConstructionInfo &ci, const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, btConvexPenetrationDepthSolver *pdSolver, int numPerturbationIterations, int minimumPointsPerturbationThreshold)
cache separating vector to speedup collision detection
int m_minimumPointsPerturbationThreshold
int m_numPerturbationIterations
ConvexPenetrationDepthSolver provides an interface for penetration depth calculation.
The btConvexShape is an abstract shape interface, implemented by all convex shapes such as btBoxShape...
virtual void releaseManifold(btPersistentManifold *manifold)=0
GjkConvexCast performs a raycast on a convex object using support mapping.
btGjkPairDetector uses GJK to implement the btDiscreteCollisionDetectorInterface
The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations.
virtual void drawLine(const btVector3 &from, const btVector3 &to, const btVector3 &color)=0
virtual void drawSphere(btScalar radius, const btTransform &transform, const btVector3 &color)
btManifoldResult is a helper class to manage contact results.
virtual void addContactPoint(const btVector3 &normalOnBInWorld, const btVector3 &pointInWorld, btScalar depth)
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping...
The btPolyhedralConvexShape is an internal interface class for polyhedral convex shapes.
The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatr...
The btSphereShape implements an implicit sphere, centered around a local origin with radius.
btVector3 can be used to represent 3D points and vectors.
btScalar length2() const
Return the length of the vector squared.
btVoronoiSimplexSolver is an implementation of the closest point distance algorithm from a 1-4 points...
const btCollisionShape * getCollisionShape() const
const btCollisionObject * getCollisionObject() const
const btTransform & getWorldTransform() const
RayResult stores the closest result alternatively, add a callback method to decide about closest/all ...
CreateFunc(btConvexPenetrationDepthSolver *pdSolver)
int m_numPerturbationIterations
int m_minimumPointsPerturbationThreshold
btConvexPenetrationDepthSolver * m_pdSolver
virtual void setShapeIdentifiersA(int partId0, int index0)=0
setShapeIdentifiersA/B provides experimental support for per-triangle material / custom material comb...
virtual void setShapeIdentifiersB(int partId1, int index1)=0
virtual void addContactPoint(const btVector3 &normalOnBInWorld, const btVector3 &pointInWorld, btScalar depth)=0