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);
virtual void finishSerialization()=0
virtual void getEdge(int i, btVector3 &pa, btVector3 &pb) const =0
virtual int getNumManifolds() const =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)
btVector3 getHalfExtentsWithMargin() const
btConvexCast is an interface for Casting
virtual btCollisionAlgorithm * findAlgorithm(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, btPersistentManifold *sharedManifold=0)=0
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
void performRaycast(btTriangleCallback *callback, const btVector3 &raySource, const btVector3 &rayTarget)
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 ...
LocalShapeInfo * m_localShapeInfo
virtual void updateAabbs()
btScalar getRadius() const
virtual btScalar getRadius() const
btCollisionWorld(btDispatcher *dispatcher, btBroadphaseInterface *broadphasePairCache, btCollisionConfiguration *collisionConfiguration)
for debug drawing
virtual void reportErrorWarning(const char *warningString)=0
virtual btPersistentManifold * getManifoldByIndexInternal(int index)=0
bool m_forceUpdateAllAabbs
m_forceUpdateAllAabbs can be set to false as an optimization to only update active object AABBs it is...
btVector3 getHalfExtentsWithMargin() const
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
int getInternalType() const
reserved for Bullet internal usage
The btMultiSphereShape represents the convex hull of a collection of spheres.
virtual int getDebugMode() const =0
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)
The btCapsuleShape represents a capsule around the Y axis, there is also the btCapsuleShapeX aligned ...
const btVector3 & getPlaneNormal() const
btScalar getSphereRadius(int index) const
virtual void drawPlane(const btVector3 &planeNormal, btScalar planeConst, const btTransform &transform, const btVector3 &color)
btCollisionConfiguration allows to configure Bullet collision detection stack allocator size...
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...
int getNumCollisionObjects() const
The btSphereShape implements an implicit sphere, centered around a local origin with radius...
btCollisionWorld::RayResultCallback & m_resultCallback
ManifoldContactPoint collects and maintains persistent contactpoints.
btScalar getRadius() const
const btCollisionWorld * m_world
int getCollisionFlags() const
btDispatcher * m_dispatcher1
btManifoldResult is a helper class to manage contact results.
virtual void serializeSingleShape(btSerializer *serializer) const
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)
virtual void processAllTriangles(btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const =0
const btDbvt * getDynamicAabbTree() const
int getConeUpIndex() const
virtual void computeOverlappingPairs()
the computeOverlappingPairs is usually already called by performDiscreteCollisionDetection (or stepSi...
virtual void drawCapsule(btScalar radius, btScalar halfHeight, int upAxis, const btTransform &transform, const btVector3 &color)
btScalar m_closestHitFraction
btSingleRayCallback(const btVector3 &rayFromWorld, const btVector3 &rayToWorld, const btCollisionWorld *world, btCollisionWorld::RayResultCallback &resultCallback)
virtual void drawContactPoint(const btVector3 &PointOnB, const btVector3 &normalOnB, btScalar distance, int lifeTime, const btVector3 &color)=0
btScalar dot(const btVector3 &v) const
Return the dot product.
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
btTransform m_convexToTrans
The btConvexShape is an abstract shape interface, implemented by all convex shapes such as btBoxShape...
const btTransform & getInterpolationWorldTransform() const
GjkConvexCast performs a raycast on a convex object using support mapping.
The btTriangleMeshShape is an internal concave triangle mesh interface. Don't use this class directly...
btScalar m_allowedPenetration
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
void setActivationState(int newState) const
btTransform & getWorldTransform()
btVector3 m_normalWorldOnB
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)
int size() const
return the number of elements in the array
btBroadphaseProxy * getBroadphaseHandle()
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
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...
btIDebugDraw * m_debugDrawer
virtual btIDebugDraw * getDebugDrawer()
int getSphereCount() const
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
btScalar getHeight() const
const btConvexPolyhedron * getConvexPolyhedron() const
virtual int getNumEdges() const =0
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...
bool isStaticOrKinematicObject() const
const btTransform & getWorldTransform() const
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...
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 ...
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...
const btManifoldPoint & getContactPoint(int index) const
virtual bool needsCollision(btBroadphaseProxy *proxy0) const
btDispatcher * getDispatcher()
The btBroadphaseProxy is the main class that can be used with the Bullet broadphases.
const btCollisionShape * getCollisionShape() const
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.
const Value * find(const Key &key) const
btScalar length2() const
Return the length of the vector squared.
virtual bool needsCollision(btBroadphaseProxy *proxy0) const
virtual void serialize(btSerializer *serializer)
Preliminary serialization test for Bullet 2.76. Loading those files requires a separate parser (Bulle...
const btBroadphaseInterface * getBroadphase() const
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...
CollisionWorld is interface and container for the collision detection.
EpaPenetrationDepthSolver uses the Expanding Polytope Algorithm to calculate the penetration depth be...
void setBroadphaseHandle(btBroadphaseProxy *handle)
btDispatcherInfo & getDispatchInfo()
btVector3 normalized() const
Return a normalized version of this vector.
bool isPolyhedral() const
#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 getNumContacts() const
int findLinearSearch(const T &key) const
virtual btScalar getMargin() const
btAlignedObjectArray< btCollisionObject * > m_collisionObjects
The btCylinderShape class implements a cylinder shape primitive, centered around the origin...
#define DISABLE_DEACTIVATION
virtual bool process(const btBroadphaseProxy *proxy)
virtual void serializeSingleObject(class btSerializer *serializer) const
virtual void performDiscreteCollisionDetection()
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 getMargin() const
virtual btScalar addSingleResult(LocalConvexResult &convexResult, bool normalInWorldSpace)=0
void updateSingleAabb(btCollisionObject *colObj)
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()
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...
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)
btScalar getDistance() const
virtual bool process(const btBroadphaseProxy *proxy)
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...
btCollisionShape * getChildShape(int index)
const btVector3 & getSpherePosition(int index) const
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 ...
btScalar getHalfHeight() const
btCollisionAlgorithm is an collision interface that is compatible with the Broadphase and btDispatche...
const btCollisionShape * getCollisionShape() const
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)
int getActivationState() const
virtual void destroyProxy(btBroadphaseProxy *proxy, btDispatcher *dispatcher)=0
virtual void addContactPoint(const btVector3 &normalOnBInWorld, const btVector3 &pointInWorld, btScalar depth)
btCollisionWorld::ContactResultCallback & m_resultCallback
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...
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)
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...
virtual void InternalProcessAllTriangles(btInternalTriangleIndexCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
const btScalar & getPlaneConstant() const
virtual void aabbTest(const btVector3 &aabbMin, const btVector3 &aabbMax, btBroadphaseAabbCallback &callback)=0
const btCollisionObject * getCollisionObject() const
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
int getNumChildShapes() const