210void btConvexConvexAlgorithm ::setLowLevelOfDetail(
bool useLowLevel)
279 m_ownManifold =
true;
281 resultOut->setPersistentManifold(m_manifoldPtr);
291#ifndef BT_DISABLE_CAPSULE_CAPSULE_COLLIDER
305 if (dist < threshold)
327 if (dist < threshold)
349 if (dist < threshold)
359#ifdef USE_SEPDISTANCE_UTIL2
376#ifdef USE_SEPDISTANCE_UTIL2
389 input.m_maximumDistanceSquared =
min0->getMargin() +
min1->getMargin() + m_manifoldPtr->getContactBreakingThreshold() +
resultOut->m_closestPointDistanceThreshold;
392 input.m_maximumDistanceSquared *=
input.m_maximumDistanceSquared;
398#ifdef USE_SEPDISTANCE_UTIL2
411 if (
min0->isPolyhedral() &&
min1->isPolyhedral())
525 worldVertsB1.resize(0);
570 tri->m_vertices1[2] -
tri->m_vertices1[1],
571 tri->m_vertices1[0] -
tri->m_vertices1[2]};
684 worldVertsB2.resize(0);
704 if (m_numPerturbationIterations &&
resultOut->getPersistentManifold()->getNumContacts() < m_minimumPointsPerturbationThreshold)
745 for (i = 0; i < m_numPerturbationIterations; i++)
777#ifdef USE_SEPDISTANCE_UTIL2
829 if (
ccd1.calcTimeOfImpact(
col0->getWorldTransform(),
col0->getInterpolationWorldTransform(),
830 col1->getWorldTransform(),
col1->getInterpolationWorldTransform(),
result))
834 if (
col0->getHitFraction() >
result.m_fraction)
837 if (
col1->getHitFraction() >
result.m_fraction)
856 if (
ccd1.calcTimeOfImpact(
col0->getWorldTransform(),
col0->getInterpolationWorldTransform(),
857 col1->getWorldTransform(),
col1->getInterpolationWorldTransform(),
result))
861 if (
col0->getHitFraction() >
result.m_fraction)
864 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.
btAlignedObjectArray< btVector3 > m_vertices
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.
btVector3 cross(const btVector3 &v) const
Return the cross product between this and another vector.
btScalar dot(const btVector3 &v) const
Return the dot product.
btScalar length2() const
Return the length of the vector squared.
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
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
btAlignedObjectArray< int > m_indices