71 :m_dispatcher1(dispatcher),
72 m_broadphasePairCache(pairCache),
74 m_forceUpdateAllAabbs(true)
133 collisionFilterGroup,
164 collisionFilterGroup,
182 minAabb -= contactThreshold;
183 maxAabb += contactThreshold;
189 minAabb2 -= contactThreshold;
190 maxAabb2 += contactThreshold;
207 static bool reportMe =
true;
246 BT_PROFILE(
"performDiscreteCollisionDetection");
345 convexCasterPtr = &gjkConvexCaster;
347 convexCasterPtr = &subSimplexConvexCaster;
351 if (convexCaster.
calcTimeOfImpact(rayFromTrans,rayToTrans,colObjWorldTransform,colObjWorldTransform,castResult))
359 #ifdef USE_SUBSIMPLEX_CONVEX_CAST 362 #endif //USE_SUBSIMPLEX_CONVEX_CAST 373 bool normalInWorldSpace =
true;
396 m_resultCallback(resultCallback),
397 m_collisionObject(collisionObject),
398 m_triangleMesh(triangleMesh),
399 m_colObjWorldTransform(colObjWorldTransform)
418 bool normalInWorldSpace =
true;
419 return m_resultCallback->
addSingleResult(rayResult,normalInWorldSpace);
434 BridgeTriangleRaycastCallback rcb(rayFromLocal,rayToLocal,&resultCallback,collisionObjectWrap->
getCollisionObject(),triangleMesh,colObjWorldTransform);
446 btVector3 rayFromLocalScaled = rayFromLocal / scale;
447 btVector3 rayToLocalScaled = rayToLocal / scale;
450 BridgeTriangleRaycastCallback rcb(rayFromLocalScaled, rayToLocalScaled, &resultCallback, collisionObjectWrap->
getCollisionObject(), triangleMesh, colObjWorldTransform);
452 triangleMesh->
performRaycast(&rcb, rayFromLocalScaled, rayToLocalScaled);
478 m_resultCallback(resultCallback),
479 m_collisionObject(collisionObject),
480 m_triangleMesh(triangleMesh),
481 m_colObjWorldTransform(colObjWorldTransform)
500 bool normalInWorldSpace =
true;
501 return m_resultCallback->
addSingleResult(rayResult,normalInWorldSpace);
507 BridgeTriangleRaycastCallback rcb(rayFromLocal,rayToLocal,&resultCallback,collisionObjectWrap->
getCollisionObject(),concaveShape, colObjWorldTransform);
510 btVector3 rayAabbMinLocal = rayFromLocal;
511 rayAabbMinLocal.
setMin(rayToLocal);
512 btVector3 rayAabbMaxLocal = rayFromLocal;
513 rayAabbMaxLocal.
setMax(rayToLocal);
527 : m_userCallback(user), m_i(i)
530 m_flags = m_userCallback->
m_flags;
566 m_collisionObject(collisionObject),
567 m_compoundShape(compoundShape),
568 m_colObjWorldTransform(colObjWorldTransform),
569 m_rayFromTrans(rayFromTrans),
570 m_rayToTrans(rayToTrans),
571 m_resultCallback(resultCallback)
576 void ProcessLeaf(
int i)
580 btTransform childWorldTrans = m_colObjWorldTransform * childTrans;
587 LocalInfoAdder2 my_cb(i, &m_resultCallback);
610 colObjWorldTransform,
614 #ifndef DISABLE_DBVT_COMPOUNDSHAPE_RAYCAST_ACCELERATION 617 btVector3 localRayFrom = colObjWorldTransform.inverseTimes(rayFromTrans).getOrigin();
618 btVector3 localRayTo = colObjWorldTransform.inverseTimes(rayToTrans).getOrigin();
622 #endif //DISABLE_DBVT_COMPOUNDSHAPE_RAYCAST_ACCELERATION 626 rayCB.ProcessLeaf(i);
670 if (castPtr->
calcTimeOfImpact(convexFromTrans,convexToTrans,colObjWorldTransform,colObjWorldTransform,castResult))
687 bool normalInWorldSpace =
true;
716 m_resultCallback(resultCallback),
717 m_collisionObject(collisionObject),
718 m_triangleMesh(triangleMesh)
728 if (hitFraction <= m_resultCallback->m_closestHitFraction)
738 bool normalInWorldSpace =
true;
741 return m_resultCallback->addSingleResult(convexResult,normalInWorldSpace);
748 BridgeTriangleConvexcastCallback tccb(castShape, convexFromTrans,convexToTrans,&resultCallback,colObjWrap->
getCollisionObject(),triangleMesh, colObjWorldTransform);
750 tccb.m_allowedPenetration = allowedPenetration;
752 castShape->
getAabb(rotationXform, boxMinLocal, boxMaxLocal);
753 triangleMesh->
performConvexcast(&tccb,convexFromLocal,convexToLocal,boxMinLocal, boxMaxLocal);
765 if (castPtr->
calcTimeOfImpact(convexFromTrans,convexToTrans,colObjWorldTransform,colObjWorldTransform,castResult))
782 bool normalInWorldSpace =
true;
808 m_resultCallback(resultCallback),
809 m_collisionObject(collisionObject),
810 m_triangleMesh(triangleMesh)
820 if (hitFraction <= m_resultCallback->m_closestHitFraction)
830 bool normalInWorldSpace =
true;
832 return m_resultCallback->addSingleResult(convexResult,normalInWorldSpace);
839 BridgeTriangleConvexcastCallback tccb(castShape, convexFromTrans,convexToTrans,&resultCallback,colObjWrap->
getCollisionObject(),concaveShape, colObjWorldTransform);
841 tccb.m_allowedPenetration = allowedPenetration;
843 castShape->
getAabb(rotationXform, boxMinLocal, boxMaxLocal);
845 btVector3 rayAabbMinLocal = convexFromLocal;
846 rayAabbMinLocal.
setMin(convexToLocal);
847 btVector3 rayAabbMaxLocal = convexFromLocal;
848 rayAabbMaxLocal.
setMax(convexToLocal);
849 rayAabbMinLocal += boxMinLocal;
850 rayAabbMaxLocal += boxMaxLocal;
869 m_colObjWrap(colObjWrap),
870 m_castShape(castShape),
871 m_convexFromTrans(convexFromTrans),
872 m_convexToTrans(convexToTrans),
873 m_allowedPenetration(allowedPenetration),
874 m_compoundShape(compoundShape),
875 m_colObjWorldTransform(colObjWorldTransform),
876 m_resultCallback(resultCallback) {
892 btTransform childWorldTrans = m_colObjWorldTransform * childTrans;
899 : m_userCallback(user), m_i(i)
921 LocalInfoAdder my_cb(index, &m_resultCallback);
936 ProcessChild(index, childTrans, childCollisionShape);
943 btVector3 fromLocalAabbMin, fromLocalAabbMax;
944 btVector3 toLocalAabbMin, toLocalAabbMax;
946 castShape->
getAabb(colObjWorldTransform.
inverse() * convexFromTrans, fromLocalAabbMin, fromLocalAabbMax);
947 castShape->
getAabb(colObjWorldTransform.
inverse() * convexToTrans, toLocalAabbMin, toLocalAabbMax);
949 fromLocalAabbMin.setMin(toLocalAabbMin);
950 fromLocalAabbMax.
setMax(toLocalAabbMax);
953 allowedPenetration, compoundShape, colObjWorldTransform, resultCallback);
965 callback.ProcessChild(i, childTrans, childCollisionShape);
987 :m_rayFromWorld(rayFromWorld),
988 m_rayToWorld(rayToWorld),
990 m_resultCallback(resultCallback)
993 m_rayFromTrans.
setOrigin(m_rayFromWorld);
997 btVector3 rayDir = (rayToWorld-rayFromWorld);
1004 m_signs[0] = m_rayDirectionInverse[0] < 0.0;
1005 m_signs[1] = m_rayDirectionInverse[1] < 0.0;
1006 m_signs[2] = m_rayDirectionInverse[2] < 0.0;
1008 m_lambda_max = rayDir.
dot(m_rayToWorld-m_rayFromWorld);
1028 #ifdef RECALCULATE_AABB 1029 btVector3 collisionObjectAabbMin,collisionObjectAabbMax;
1059 #ifndef USE_BRUTEFORCE_RAYBROADPHASE 1066 #endif //USE_BRUTEFORCE_RAYBROADPHASE 1084 :m_convexFromTrans(convexFromTrans),
1085 m_convexToTrans(convexToTrans),
1087 m_resultCallback(resultCallback),
1088 m_allowedCcdPenetration(allowedPenetration),
1089 m_castShape(castShape)
1097 m_signs[0] = m_rayDirectionInverse[0] < 0.0;
1098 m_signs[1] = m_rayDirectionInverse[1] < 0.0;
1099 m_signs[2] = m_rayDirectionInverse[2] < 0.0;
1101 m_lambda_max = rayDir.
dot(unnormalizedRayDir);
1121 m_allowedCcdPenetration);
1141 convexFromTrans = convexFromWorld;
1142 convexToTrans = convexToWorld;
1143 btVector3 castShapeAabbMin, castShapeAabbMax;
1156 #ifndef USE_BRUTEFORCE_RAYBROADPHASE 1158 btSingleSweepCallback convexCB(castShape,convexFromWorld,convexToWorld,
this,resultCallback,allowedCcdPenetration);
1172 btVector3 collisionObjectAabbMin,collisionObjectAabbMax;
1174 AabbExpand (collisionObjectAabbMin, collisionObjectAabbMax, castShapeAabbMin, castShapeAabbMax);
1177 if (
btRayAabb(convexFromWorld.
getOrigin(),convexToWorld.
getOrigin(),collisionObjectAabbMin,collisionObjectAabbMax,hitLambda,hitNormal))
1184 allowedCcdPenetration);
1188 #endif //USE_BRUTEFORCE_RAYBROADPHASE 1200 m_resultCallback(resultCallback)
1206 bool isSwapped = m_manifoldPtr->getBody0() != m_body0Wrap->getCollisionObject();
1207 btVector3 pointA = pointInWorld + normalOnBInWorld * depth;
1212 localA = m_body1Wrap->getCollisionObject()->getWorldTransform().invXform(pointA );
1213 localB = m_body0Wrap->getCollisionObject()->getWorldTransform().invXform(pointInWorld);
1216 localA = m_body0Wrap->getCollisionObject()->getWorldTransform().invXform(pointA );
1217 localB = m_body1Wrap->getCollisionObject()->getWorldTransform().invXform(pointInWorld);
1259 :m_collisionObject(collisionObject),
1261 m_resultCallback(resultCallback)
1268 if (collisionObject == m_collisionObject)
1283 algorithm->processCollision(&ob0,&ob1, m_world->
getDispatchInfo(),&contactPointResult);
1285 algorithm->~btCollisionAlgorithm();
1319 algorithm->processCollision(&obA,&obB,
getDispatchInfo(),&contactPointResult);
1321 algorithm->~btCollisionAlgorithm();
1339 m_debugDrawer(debugDrawer),
1341 m_worldTrans(worldTrans)
1347 processTriangle(triangle,partId,triangleIndex);
1353 (void)triangleIndex;
1356 wv0 = m_worldTrans*triangle[0];
1357 wv1 = m_worldTrans*triangle[1];
1358 wv2 = m_worldTrans*triangle[2];
1363 btVector3 normal = (wv1-wv0).cross(wv2-wv0);
1366 m_debugDrawer->
drawLine(center,center+normal,normalColor);
1368 m_debugDrawer->
drawLine(wv0,wv1,m_color);
1369 m_debugDrawer->
drawLine(wv1,wv2,m_color);
1370 m_debugDrawer->
drawLine(wv2,wv0,m_color);
1489 int lastV = poly->
m_faces[i].m_indices[numVerts-1];
1490 for (
int v=0;v<poly->
m_faces[i].m_indices.
size();v++)
1492 int curVert = poly->
m_faces[i].m_indices[v];
1573 for (
int i=0;i<numManifolds;i++)
1580 for (
int j=0;j<numContacts;j++)
1630 minAabb -= contactThreshold;
1631 maxAabb += contactThreshold;
1638 minAabb2 -= contactThreshold;
1639 maxAabb2 += contactThreshold;
1640 minAabb.
setMin(minAabb2);
1641 maxAabb.
setMax(maxAabb2);
1665 if (!serializedShapes.
find(shape))
1667 serializedShapes.
insert(shape,shape);
1690 for (
int i = 0; i < numManifolds; i++)
1699 const char* structType = manifold->
serialize(manifold, chunk->
m_oldPtr, serializer);
virtual const btVector3 & getLocalScaling() 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)
btVector3 getHalfExtentsWithMargin() const
btConvexCast is an interface for Casting
#define BT_CONTACTMANIFOLD_CODE
void serializeContactManifolds(btSerializer *serializer)
btVector3 m_wantsDeactivationObject
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()
btVector3 m_deactivatedObject
btScalar getRadius() const
virtual void clearLines()
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...
virtual void addCollisionObject(btCollisionObject *collisionObject, int collisionFilterGroup=btBroadphaseProxy::DefaultFilter, int collisionFilterMask=btBroadphaseProxy::AllFilter)
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 btCollisionAlgorithm * findAlgorithm(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, btPersistentManifold *sharedManifold, ebtDispatcherQueryType queryType)=0
virtual void drawBox(const btVector3 &bbMin, const btVector3 &bbMax, const btVector3 &color)
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.
const char * serialize(const class btPersistentManifold *manifold, void *dataBuffer, class btSerializer *serializer) const
btContinuousConvexCollision implements angular and linear time of impact for convex objects...
void setWorldArrayIndex(int ix)
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
btVector3 m_disabledSimulationObject
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 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 processAllTriangles(btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const =0
void swap(int index0, int index1)
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...
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
virtual void getEdge(int i, btVector3 &pa, btVector3 &pb) const =0
int m_collisionFilterMask
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 getWorldArrayIndex() const
btBvhTriangleMeshShape * getChildShape()
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 ...
btScalar m_closestPointDistanceThreshold
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
virtual int getSerializationFlags() const =0
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()
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
static btDbvtAabbMm FromMM(const btVector3 &mi, const btVector3 &mx)
btScalar getHeight() const
const btConvexPolyhedron * getConvexPolyhedron() 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...
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)
int m_collisionFilterGroup
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 btPersistentManifold ** getInternalManifoldPointer()=0
virtual void setMargin(btScalar margin)
btVector3 can be used to represent 3D points and vectors.
#define ATTRIBUTE_ALIGNED16(a)
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...
virtual int getNumManifolds() const =0
int calculateSerializeBufferSize() const
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...
virtual void finalizeChunk(btChunk *chunk, const char *structType, int chunkCode, void *oldPtr)=0
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
virtual int getDebugMode() const =0
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
virtual void refreshBroadphaseProxy(btCollisionObject *collisionObject)
The btScaledBvhTriangleMeshShape allows to instance a scaled version of an existing btBvhTriangleMesh...
btBroadphaseInterface * m_broadphasePairCache
btScalar m_closestHitFraction
virtual void setAabb(btBroadphaseProxy *proxy, const btVector3 &aabbMin, const btVector3 &aabbMax, btDispatcher *dispatcher)=0
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
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)
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
bool getCustomDebugColor(btVector3 &colorRGB) const
btScalar gContactBreakingThreshold
virtual void drawSphere(btScalar radius, const btTransform &transform, const btVector3 &color)
DBVT_PREFIX void collideTV(const btDbvtNode *root, const btDbvtVolume &volume, DBVT_IPOLICY) const
bool btRayAabb(const btVector3 &rayFrom, const btVector3 &rayTo, const btVector3 &aabbMin, const btVector3 &aabbMax, btScalar ¶m, btVector3 &normal)
virtual DefaultColors getDefaultColors() const
int getActivationState() const
virtual void destroyProxy(btBroadphaseProxy *proxy, btDispatcher *dispatcher)=0
virtual void addContactPoint(const btVector3 &normalOnBInWorld, const btVector3 &pointInWorld, btScalar depth)
btVector3 m_disabledDeactivationObject
btCollisionWorld::ContactResultCallback & m_resultCallback
btTransform m_rayFromTrans
virtual btChunk * allocate(size_t size, int numElements)=0
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
virtual int getNumEdges() const =0