70 :m_dispatcher1(dispatcher),
71 m_broadphasePairCache(pairCache),
73 m_forceUpdateAllAabbs(true)
134 collisionFilterGroup,
153 minAabb -= contactThreshold;
154 maxAabb += contactThreshold;
160 minAabb2 -= contactThreshold;
161 maxAabb2 += contactThreshold;
178 static bool reportMe =
true;
216 BT_PROFILE(
"performDiscreteCollisionDetection");
299 convexCasterPtr = &gjkConvexCaster;
301 convexCasterPtr = &subSimplexConvexCaster;
305 if (convexCaster.
calcTimeOfImpact(rayFromTrans,rayToTrans,colObjWorldTransform,colObjWorldTransform,castResult))
313 #ifdef USE_SUBSIMPLEX_CONVEX_CAST 316 #endif //USE_SUBSIMPLEX_CONVEX_CAST 327 bool normalInWorldSpace =
true;
350 m_resultCallback(resultCallback),
351 m_collisionObject(collisionObject),
352 m_triangleMesh(triangleMesh),
353 m_colObjWorldTransform(colObjWorldTransform)
372 bool normalInWorldSpace =
true;
373 return m_resultCallback->
addSingleResult(rayResult,normalInWorldSpace);
388 BridgeTriangleRaycastCallback rcb(rayFromLocal,rayToLocal,&resultCallback,collisionObjectWrap->
getCollisionObject(),triangleMesh,colObjWorldTransform);
416 m_resultCallback(resultCallback),
417 m_collisionObject(collisionObject),
418 m_triangleMesh(triangleMesh),
419 m_colObjWorldTransform(colObjWorldTransform)
438 bool normalInWorldSpace =
true;
439 return m_resultCallback->
addSingleResult(rayResult,normalInWorldSpace);
445 BridgeTriangleRaycastCallback rcb(rayFromLocal,rayToLocal,&resultCallback,collisionObjectWrap->
getCollisionObject(),concaveShape, colObjWorldTransform);
448 btVector3 rayAabbMinLocal = rayFromLocal;
449 rayAabbMinLocal.
setMin(rayToLocal);
450 btVector3 rayAabbMaxLocal = rayFromLocal;
451 rayAabbMaxLocal.
setMax(rayToLocal);
465 : m_userCallback(user), m_i(i)
468 m_flags = m_userCallback->
m_flags;
504 m_collisionObject(collisionObject),
505 m_compoundShape(compoundShape),
506 m_colObjWorldTransform(colObjWorldTransform),
507 m_rayFromTrans(rayFromTrans),
508 m_rayToTrans(rayToTrans),
509 m_resultCallback(resultCallback)
514 void ProcessLeaf(
int i)
518 btTransform childWorldTrans = m_colObjWorldTransform * childTrans;
525 LocalInfoAdder2 my_cb(i, &m_resultCallback);
548 colObjWorldTransform,
552 #ifndef DISABLE_DBVT_COMPOUNDSHAPE_RAYCAST_ACCELERATION 555 btVector3 localRayFrom = colObjWorldTransform.inverseTimes(rayFromTrans).getOrigin();
556 btVector3 localRayTo = colObjWorldTransform.inverseTimes(rayToTrans).getOrigin();
560 #endif //DISABLE_DBVT_COMPOUNDSHAPE_RAYCAST_ACCELERATION 564 rayCB.ProcessLeaf(i);
608 if (castPtr->
calcTimeOfImpact(convexFromTrans,convexToTrans,colObjWorldTransform,colObjWorldTransform,castResult))
625 bool normalInWorldSpace =
true;
654 m_resultCallback(resultCallback),
655 m_collisionObject(collisionObject),
656 m_triangleMesh(triangleMesh)
666 if (hitFraction <= m_resultCallback->m_closestHitFraction)
676 bool normalInWorldSpace =
true;
679 return m_resultCallback->addSingleResult(convexResult,normalInWorldSpace);
686 BridgeTriangleConvexcastCallback tccb(castShape, convexFromTrans,convexToTrans,&resultCallback,colObjWrap->
getCollisionObject(),triangleMesh, colObjWorldTransform);
688 tccb.m_allowedPenetration = allowedPenetration;
690 castShape->
getAabb(rotationXform, boxMinLocal, boxMaxLocal);
691 triangleMesh->
performConvexcast(&tccb,convexFromLocal,convexToLocal,boxMinLocal, boxMaxLocal);
703 if (castPtr->
calcTimeOfImpact(convexFromTrans,convexToTrans,colObjWorldTransform,colObjWorldTransform,castResult))
720 bool normalInWorldSpace =
true;
746 m_resultCallback(resultCallback),
747 m_collisionObject(collisionObject),
748 m_triangleMesh(triangleMesh)
758 if (hitFraction <= m_resultCallback->m_closestHitFraction)
768 bool normalInWorldSpace =
true;
770 return m_resultCallback->addSingleResult(convexResult,normalInWorldSpace);
777 BridgeTriangleConvexcastCallback tccb(castShape, convexFromTrans,convexToTrans,&resultCallback,colObjWrap->
getCollisionObject(),concaveShape, colObjWorldTransform);
779 tccb.m_allowedPenetration = allowedPenetration;
781 castShape->
getAabb(rotationXform, boxMinLocal, boxMaxLocal);
783 btVector3 rayAabbMinLocal = convexFromLocal;
784 rayAabbMinLocal.
setMin(convexToLocal);
785 btVector3 rayAabbMaxLocal = convexFromLocal;
786 rayAabbMaxLocal.
setMax(convexToLocal);
787 rayAabbMinLocal += boxMinLocal;
788 rayAabbMaxLocal += boxMaxLocal;
803 btTransform childWorldTrans = colObjWorldTransform * childTrans;
810 : m_userCallback(user), m_i(i)
832 LocalInfoAdder my_cb(i, &resultCallback);
837 &tmpObj,my_cb, allowedPenetration);
859 :m_rayFromWorld(rayFromWorld),
860 m_rayToWorld(rayToWorld),
862 m_resultCallback(resultCallback)
865 m_rayFromTrans.
setOrigin(m_rayFromWorld);
869 btVector3 rayDir = (rayToWorld-rayFromWorld);
876 m_signs[0] = m_rayDirectionInverse[0] < 0.0;
877 m_signs[1] = m_rayDirectionInverse[1] < 0.0;
878 m_signs[2] = m_rayDirectionInverse[2] < 0.0;
880 m_lambda_max = rayDir.
dot(m_rayToWorld-m_rayFromWorld);
900 #ifdef RECALCULATE_AABB 901 btVector3 collisionObjectAabbMin,collisionObjectAabbMax;
931 #ifndef USE_BRUTEFORCE_RAYBROADPHASE 938 #endif //USE_BRUTEFORCE_RAYBROADPHASE 956 :m_convexFromTrans(convexFromTrans),
957 m_convexToTrans(convexToTrans),
959 m_resultCallback(resultCallback),
960 m_allowedCcdPenetration(allowedPenetration),
961 m_castShape(castShape)
969 m_signs[0] = m_rayDirectionInverse[0] < 0.0;
970 m_signs[1] = m_rayDirectionInverse[1] < 0.0;
971 m_signs[2] = m_rayDirectionInverse[2] < 0.0;
973 m_lambda_max = rayDir.
dot(unnormalizedRayDir);
993 m_allowedCcdPenetration);
1013 convexFromTrans = convexFromWorld;
1014 convexToTrans = convexToWorld;
1015 btVector3 castShapeAabbMin, castShapeAabbMax;
1028 #ifndef USE_BRUTEFORCE_RAYBROADPHASE 1030 btSingleSweepCallback convexCB(castShape,convexFromWorld,convexToWorld,
this,resultCallback,allowedCcdPenetration);
1044 btVector3 collisionObjectAabbMin,collisionObjectAabbMax;
1046 AabbExpand (collisionObjectAabbMin, collisionObjectAabbMax, castShapeAabbMin, castShapeAabbMax);
1049 if (
btRayAabb(convexFromWorld.
getOrigin(),convexToWorld.
getOrigin(),collisionObjectAabbMin,collisionObjectAabbMax,hitLambda,hitNormal))
1056 allowedCcdPenetration);
1060 #endif //USE_BRUTEFORCE_RAYBROADPHASE 1072 m_resultCallback(resultCallback)
1078 bool isSwapped = m_manifoldPtr->getBody0() != m_body0Wrap->getCollisionObject();
1079 btVector3 pointA = pointInWorld + normalOnBInWorld * depth;
1084 localA = m_body1Wrap->getCollisionObject()->getWorldTransform().invXform(pointA );
1085 localB = m_body0Wrap->getCollisionObject()->getWorldTransform().invXform(pointInWorld);
1088 localA = m_body0Wrap->getCollisionObject()->getWorldTransform().invXform(pointA );
1089 localB = m_body1Wrap->getCollisionObject()->getWorldTransform().invXform(pointInWorld);
1131 :m_collisionObject(collisionObject),
1133 m_resultCallback(resultCallback)
1140 if (collisionObject == m_collisionObject)
1155 algorithm->processCollision(&ob0,&ob1, m_world->
getDispatchInfo(),&contactPointResult);
1157 algorithm->~btCollisionAlgorithm();
1190 algorithm->processCollision(&obA,&obB,
getDispatchInfo(),&contactPointResult);
1192 algorithm->~btCollisionAlgorithm();
1210 m_debugDrawer(debugDrawer),
1212 m_worldTrans(worldTrans)
1218 processTriangle(triangle,partId,triangleIndex);
1224 (void)triangleIndex;
1227 wv0 = m_worldTrans*triangle[0];
1228 wv1 = m_worldTrans*triangle[1];
1229 wv2 = m_worldTrans*triangle[2];
1234 btVector3 normal = (wv1-wv0).cross(wv2-wv0);
1237 m_debugDrawer->
drawLine(center,center+normal,normalColor);
1239 m_debugDrawer->
drawLine(wv0,wv1,m_color);
1240 m_debugDrawer->
drawLine(wv1,wv2,m_color);
1241 m_debugDrawer->
drawLine(wv2,wv0,m_color);
1360 int lastV = poly->
m_faces[i].m_indices[numVerts-1];
1361 for (
int v=0;v<poly->
m_faces[i].m_indices.
size();v++)
1363 int curVert = poly->
m_faces[i].m_indices[v];
1436 for (
int i=0;i<numManifolds;i++)
1443 for (
int j=0;j<numContacts;j++)
1490 minAabb -= contactThreshold;
1491 maxAabb += contactThreshold;
1498 minAabb2 -= contactThreshold;
1499 maxAabb2 += contactThreshold;
1500 minAabb.
setMin(minAabb2);
1501 maxAabb.
setMax(maxAabb2);
1525 if (!serializedShapes.
find(shape))
1527 serializedShapes.
insert(shape,shape);
btVector3 getHalfExtentsWithMargin() const
virtual void finishSerialization()=0
btSingleSweepCallback(const btConvexShape *castShape, const btTransform &convexFromTrans, const btTransform &convexToTrans, const btCollisionWorld *world, btCollisionWorld::ConvexResultCallback &resultCallback, btScalar allowedPenetration)
void serializeCollisionObjects(btSerializer *serializer)
btAlignedObjectArray< btVector3 > m_vertices
btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping...
The btConvexTriangleMeshShape is a convex hull of a triangle mesh, but the performance is not as good...
void push_back(const T &_Val)
btScalar getSphereRadius(int index) const
btConvexCast is an interface for Casting
virtual btCollisionAlgorithm * findAlgorithm(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, btPersistentManifold *sharedManifold=0)=0
btScalar getRadius() const
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
void performRaycast(btTriangleCallback *callback, const btVector3 &raySource, const btVector3 &rayTarget)
LocalShapeInfo * m_localShapeInfo
virtual void updateAabbs()
int findLinearSearch(const T &key) const
btCollisionWorld(btDispatcher *dispatcher, btBroadphaseInterface *broadphasePairCache, btCollisionConfiguration *collisionConfiguration)
for debug drawing
virtual void reportErrorWarning(const char *warningString)=0
virtual btPersistentManifold * getManifoldByIndexInternal(int index)=0
const Value * find(const Key &key) const
bool m_forceUpdateAllAabbs
m_forceUpdateAllAabbs can be set to false as an optimization to only update active object AABBs it is...
btScalar length2() const
Return the length of the vector squared.
virtual void drawLine(const btVector3 &from, const btVector3 &to, const btVector3 &color)=0
virtual void dispatchAllCollisionPairs(btOverlappingPairCache *pairCache, const btDispatcherInfo &dispatchInfo, btDispatcher *dispatcher)=0
virtual void startSerialization()=0
The btMultiSphereShape represents the convex hull of a collection of spheres.
const btScalar & getPlaneConstant() const
virtual void InternalProcessAllTriangles(btInternalTriangleIndexCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
virtual void drawBox(const btVector3 &bbMin, const btVector3 &bbMax, const btVector3 &color)
virtual void addCollisionObject(btCollisionObject *collisionObject, short int collisionFilterGroup=btBroadphaseProxy::DefaultFilter, short int collisionFilterMask=btBroadphaseProxy::AllFilter)
int getNumContacts() const
The btCapsuleShape represents a capsule around the Y axis, there is also the btCapsuleShapeX aligned ...
const btDbvt * getDynamicAabbTree() const
virtual void drawPlane(const btVector3 &planeNormal, btScalar planeConst, const btTransform &transform, const btVector3 &color)
btVector3 getHalfExtentsWithMargin() const
btCollisionConfiguration allows to configure Bullet collision detection stack allocator size...
virtual void serializeSingleShape(btSerializer *serializer) const
The btDbvt class implements a fast dynamic bounding volume tree based on axis aligned bounding boxes ...
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
RayResultCallback is used to report new raycast results.
btContinuousConvexCollision implements angular and linear time of impact for convex objects...
The btSphereShape implements an implicit sphere, centered around a local origin with radius...
btCollisionWorld::RayResultCallback & m_resultCallback
ManifoldContactPoint collects and maintains persistent contactpoints.
const btCollisionWorld * m_world
int getActivationState() const
btDispatcher * m_dispatcher1
btManifoldResult is a helper class to manage contact results.
static DBVT_PREFIX void rayTest(const btDbvtNode *root, const btVector3 &rayFrom, const btVector3 &rayTo, DBVT_IPOLICY)
rayTest is a re-entrant ray test, and can be called in parallel as long as the btAlignedAlloc is thre...
static void rayTestSingleInternal(const btTransform &rayFromTrans, const btTransform &rayToTrans, const btCollisionObjectWrapper *collisionObjectWrap, RayResultCallback &resultCallback)
const btCollisionShape * getCollisionShape() const
virtual void computeOverlappingPairs()
the computeOverlappingPairs is usually already called by performDiscreteCollisionDetection (or stepSi...
bool isStaticOrKinematicObject() const
virtual void drawCapsule(btScalar radius, btScalar halfHeight, int upAxis, const btTransform &transform, const btVector3 &color)
int getNumChildShapes() const
btScalar m_closestHitFraction
btSingleRayCallback(const btVector3 &rayFromWorld, const btVector3 &rayToWorld, const btCollisionWorld *world, btCollisionWorld::RayResultCallback &resultCallback)
virtual void processAllTriangles(btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const =0
virtual void drawContactPoint(const btVector3 &PointOnB, const btVector3 &normalOnB, btScalar distance, int lifeTime, const btVector3 &color)=0
virtual void getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const =0
getAabb returns the axis aligned bounding box in the coordinate frame of the given transform t...
The btHashMap template class implements a generic and lightweight hashmap.
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
btTransform m_convexToTrans
int getNumCollisionObjects() const
btVector3 normalized() const
Return a normalized version of this vector.
The btConvexShape is an abstract shape interface, implemented by all convex shapes such as btBoxShape...
virtual bool needsCollision(btBroadphaseProxy *proxy0) const
GjkConvexCast performs a raycast on a convex object using support mapping.
const btManifoldPoint & getContactPoint(int index) const
The btTriangleMeshShape is an internal concave triangle mesh interface. Don't use this class directly...
btScalar m_allowedPenetration
virtual void getEdge(int i, btVector3 &pa, btVector3 &pb) const =0
void AabbExpand(btVector3 &aabbMin, btVector3 &aabbMax, const btVector3 &expansionMin, const btVector3 &expansionMax)
virtual btOverlappingPairCache * getOverlappingPairCache()=0
The btBvhTriangleMeshShape is a static-triangle mesh shape, it can only be used for fixed/non-moving ...
btIDebugDraw * m_debugDrawer
virtual btScalar addSingleResult(LocalRayResult &rayResult, bool normalInWorldSpace)=0
int getSphereCount() const
btTransform & getWorldTransform()
btVector3 m_normalWorldOnB
btScalar getHalfHeight() const
RayResult stores the closest result alternatively, add a callback method to decide about closest/all ...
btVector3 m_positionWorldOnB
virtual void drawCone(btScalar radius, btScalar height, int upAxis, const btTransform &transform, const btVector3 &color)
void getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const =0
getAabb's default implementation is brute force, expected derived classes to implement a fast dedicat...
btBroadphaseProxy * getBroadphaseHandle()
int getConeUpIndex() const
btTransform m_convexFromTrans
btVoronoiSimplexSolver is an implementation of the closest point distance algorithm from a 1-4 points...
const btCollisionWorld * m_world
btCollisionWorld::ConvexResultCallback & m_resultCallback
btIDebugDraw * m_debugDrawer
virtual btIDebugDraw * getDebugDrawer()
void contactPairTest(btCollisionObject *colObjA, btCollisionObject *colObjB, ContactResultCallback &resultCallback)
contactTest performs a discrete collision test between two collision objects and calls the resultCall...
btAlignedObjectArray< btFace > m_faces
The btTriangleCallback provides a callback for each overlapping triangle when calling processAllTrian...
DebugDrawcallback(btIDebugDraw *debugDrawer, const btTransform &worldTrans, const btVector3 &color)
bool isStaticObject() const
The btConeShape implements a cone shape primitive, centered around the origin and aligned with the Y ...
btTransform & getChildTransform(int index)
virtual void cleanProxyFromPairs(btBroadphaseProxy *proxy, btDispatcher *dispatcher)=0
virtual bool needsCollision(btBroadphaseProxy *proxy0) const
btScalar dot(const btVector3 &v) const
Return the dot product.
const btCollisionObject * getCollisionObject() const
virtual void debugDrawObject(const btTransform &worldTransform, const btCollisionShape *shape, const btVector3 &color)
void contactTest(btCollisionObject *colObj, ContactResultCallback &resultCallback)
contactTest performs a discrete collision test between colObj against all objects in the btCollisionW...
btCollisionObject can be used to manage collision detection objects.
void insert(const Key &key, const Value &value)
#define DISABLE_SIMULATION
The btPolyhedralConvexShape is an internal interface class for polyhedral convex shapes.
static void rayTestSingle(const btTransform &rayFromTrans, const btTransform &rayToTrans, btCollisionObject *collisionObject, const btCollisionShape *collisionShape, const btTransform &colObjWorldTransform, RayResultCallback &resultCallback)
rayTestSingle performs a raycast call and calls the resultCallback.
The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations...
const btTransform & getInterpolationWorldTransform() const
btScalar getRadius() const
LocalShapeInfo gives extra information for complex shapes Currently, only btTriangleMeshShape is avai...
virtual void drawAabb(const btVector3 &from, const btVector3 &to, const btVector3 &color)
btVector3 m_positionWorldOnA
m_positionWorldOnA is redundant information, see getPositionWorldOnA(), but for clarity ...
btScalar getHeight() const
virtual void removeCollisionObject(btCollisionObject *collisionObject)
virtual void freeCollisionAlgorithm(void *ptr)=0
void performConvexcast(btTriangleCallback *callback, const btVector3 &boxSource, const btVector3 &boxTarget, const btVector3 &boxMin, const btVector3 &boxMax)
virtual ~btCollisionWorld()
The btBroadphaseInterface class provides an interface to detect aabb-overlapping object pairs...
btDispatcher * getDispatcher()
int getCollisionFlags() const
The btBroadphaseProxy is the main class that can be used with the Bullet broadphases.
virtual void rayTest(const btVector3 &rayFromWorld, const btVector3 &rayToWorld, RayResultCallback &resultCallback) const
rayTest performs a raycast on all objects in the btCollisionWorld, and calls the resultCallback This ...
virtual void processTriangle(btVector3 *triangle, int partId, int triangleIndex)
The btBoxShape is a box primitive around the origin, its sides axis aligned with length specified by ...
virtual void setMargin(btScalar margin)
btVector3 can be used to represent 3D points and vectors.
virtual void serialize(btSerializer *serializer)
Preliminary serialization test for Bullet 2.76. Loading those files requires a separate parser (Bulle...
int size() const
return the number of elements in the array
bool isPolyhedral() const
virtual int getNumManifolds() const =0
static void objectQuerySingle(const btConvexShape *castShape, const btTransform &rayFromTrans, const btTransform &rayToTrans, btCollisionObject *collisionObject, const btCollisionShape *collisionShape, const btTransform &colObjWorldTransform, ConvexResultCallback &resultCallback, btScalar allowedPenetration)
objectQuerySingle performs a collision detection query and calls the resultCallback. It is used internally by rayTest.
btSubsimplexConvexCast implements Gino van den Bergens' paper "Ray Casting against bteral Convex Obje...
const btVector3 & getPlaneNormal() const
CollisionWorld is interface and container for the collision detection.
void convexSweepTest(const btConvexShape *castShape, const btTransform &from, const btTransform &to, ConvexResultCallback &resultCallback, btScalar allowedCcdPenetration=btScalar(0.)) const
convexTest performs a swept convex cast on all objects in the btCollisionWorld, and calls the resultC...
EpaPenetrationDepthSolver uses the Expanding Polytope Algorithm to calculate the penetration depth be...
void setBroadphaseHandle(btBroadphaseProxy *handle)
btDispatcherInfo & getDispatchInfo()
#define WANTS_DEACTIVATION
The btConcaveShape class provides an interface for non-moving (static) concave shapes.
void remove(const T &key)
virtual void drawTransform(const btTransform &transform, btScalar orthoLen)
int getInternalType() const
reserved for Bullet internal usage
virtual btScalar getRadius() const
virtual int getDebugMode() const =0
btAlignedObjectArray< btCollisionObject * > m_collisionObjects
const btTransform & getWorldTransform() const
The btCylinderShape class implements a cylinder shape primitive, centered around the origin...
#define DISABLE_DEACTIVATION
virtual bool process(const btBroadphaseProxy *proxy)
virtual void performDiscreteCollisionDetection()
virtual void serializeSingleObject(class btSerializer *serializer) const
void calculateTemporalAabb(const btTransform &curTrans, const btVector3 &linvel, const btVector3 &angvel, btScalar timeStep, btVector3 &temporalAabbMin, btVector3 &temporalAabbMax) const
calculateTemporalAabb calculates the enclosing aabb for the moving object over interval [0...
LocalShapeInfo * m_localShapeInfo
btBroadphaseInterface * m_broadphasePairCache
btScalar m_closestHitFraction
virtual void setAabb(btBroadphaseProxy *proxy, const btVector3 &aabbMin, const btVector3 &aabbMax, btDispatcher *dispatcher)=0
btScalar m_allowedCcdPenetration
const btConvexShape * m_castShape
virtual btScalar addSingleResult(LocalConvexResult &convexResult, bool normalInWorldSpace)=0
void updateSingleAabb(btCollisionObject *colObj)
virtual btScalar getMargin() const
The btCompoundShape allows to store multiple other btCollisionShapes This allows for moving concave c...
void setMax(const btVector3 &other)
Set each element to the max of the current values and the values of another btVector3.
class btStridingMeshInterface * getMeshInterface()
The btStaticPlaneShape simulates an infinite non-moving (static) collision plane. ...
RayResultCallback is used to report new raycast results.
btBridgedManifoldResult(const btCollisionObjectWrapper *obj0Wrap, const btCollisionObjectWrapper *obj1Wrap, btCollisionWorld::ContactResultCallback &resultCallback)
virtual bool process(const btBroadphaseProxy *proxy)
btCollisionShape * getChildShape(int index)
virtual void internalProcessTriangleIndex(btVector3 *triangle, int partId, int triangleIndex)
virtual void debugDrawWorld()
The btDispatcher interface class can be used in combination with broadphase to dispatch calculations ...
btCollisionAlgorithm is an collision interface that is compatible with the Broadphase and btDispatche...
btScalar gContactBreakingThreshold
virtual void drawSphere(btScalar radius, const btTransform &transform, const btVector3 &color)
bool btRayAabb(const btVector3 &rayFrom, const btVector3 &rayTo, const btVector3 &aabbMin, const btVector3 &aabbMax, btScalar ¶m, btVector3 &normal)
virtual void destroyProxy(btBroadphaseProxy *proxy, btDispatcher *dispatcher)=0
virtual void addContactPoint(const btVector3 &normalOnBInWorld, const btVector3 &pointInWorld, btScalar depth)
const btBroadphaseInterface * getBroadphase() const
btCollisionWorld::ContactResultCallback & m_resultCallback
void setActivationState(int newState) const
btTransform m_rayFromTrans
virtual void drawCylinder(btScalar radius, btScalar halfHeight, int upAxis, const btTransform &transform, const btVector3 &color)
virtual void rayTest(const btVector3 &rayFrom, const btVector3 &rayTo, btBroadphaseRayCallback &rayCallback, const btVector3 &aabbMin=btVector3(0, 0, 0), const btVector3 &aabbMax=btVector3(0, 0, 0))=0
static void objectQuerySingleInternal(const btConvexShape *castShape, const btTransform &convexFromTrans, const btTransform &convexToTrans, const btCollisionObjectWrapper *colObjWrap, ConvexResultCallback &resultCallback, btScalar allowedPenetration)
btScalar getDistance() const
const btVector3 & getSpherePosition(int index) const
const btConvexPolyhedron * getConvexPolyhedron() const
virtual void calculateOverlappingPairs(btDispatcher *dispatcher)=0
calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during th...
void setMin(const btVector3 &other)
Set each element to the min of the current values and the values of another btVector3.
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
const btCollisionShape * getCollisionShape() const
virtual btScalar getMargin() const
virtual void aabbTest(const btVector3 &aabbMin, const btVector3 &aabbMax, btBroadphaseAabbCallback &callback)=0
virtual bool calcTimeOfImpact(const btTransform &fromA, const btTransform &toA, const btTransform &fromB, const btTransform &toB, CastResult &result)=0
cast a convex against another convex object
virtual int getNumEdges() const =0