30 m_isSwapped(isSwapped),
31 m_sharedManifold(ci.m_manifold)
56 for (i = 0; i < numChildren; i++)
58 if (compoundShape->getDynamicAabbTree())
79 for (i = 0; i < numChildren; i++)
114 btAssert(index < compoundShape->getNumChildShapes());
126 btTransform newChildWorldTrans = orgTrans * childTrans;
130 childShape->
getAabb(newChildWorldTrans, aabbMin0, aabbMax0);
133 aabbMin0 -= extendAabb;
134 aabbMax0 += extendAabb;
145 bool allocatedAlgorithm =
false;
150 allocatedAlgorithm =
true;
197 if (allocatedAlgorithm)
199 algo->~btCollisionAlgorithm();
247 const btDbvt* tree = compoundShape->getDynamicAabbTree();
283 localAabbMin -= extraExtends;
284 localAabbMax += extraExtends;
295 for (i = 0; i < numChildren; i++)
310 btVector3 aabbMin0, aabbMax0, aabbMin1, aabbMax1;
312 for (i = 0; i < numChildren; i++)
316 childShape = compoundShape->getChildShape(i);
320 const btTransform& childTrans = compoundShape->getChildTransform(i);
321 newChildWorldTrans = orgTrans * childTrans;
324 childShape->
getAabb(newChildWorldTrans, aabbMin0, aabbMax0);
362 for (i = 0; i < numChildren; i++)
369 const btTransform& childTrans = compoundShape->getChildTransform(i);
376 if (frac < hitFraction)
btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping...
void removeChildAlgorithms()
DBVT_INLINE const btVector3 & Mins() const
virtual ~btCompoundCollisionAlgorithm()
const btCollisionObjectWrapper * getBody0Wrap() const
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
class btPersistentManifold * m_sharedManifold
virtual btCollisionAlgorithm * findAlgorithm(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, btPersistentManifold *sharedManifold, ebtDispatcherQueryType queryType)=0
void setPersistentManifold(btPersistentManifold *manifoldPtr)
btCompoundLeafCallback(const btCollisionObjectWrapper *compoundObjWrap, const btCollisionObjectWrapper *otherObjWrap, btDispatcher *dispatcher, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut, btCollisionAlgorithm **childCollisionAlgorithms, btPersistentManifold *sharedManifold)
This class is not enabled yet (work-in-progress) to more aggressively activate objects.
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...
void refreshContactPoints()
btCompoundCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo &ci, const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, bool isSwapped)
int m_compoundShapeRevision
btManifoldResult is a helper class to manage contact results.
class btIDebugDraw * m_debugDraw
const btCollisionShape * getCollisionShape() const
bool TestAabbAgainstAabb2(const btVector3 &aabbMin1, const btVector3 &aabbMax1, const btVector3 &aabbMin2, const btVector3 &aabbMax2)
conservative test for overlap between two aabbs
int getNumChildShapes() const
const btDispatcherInfo & m_dispatchInfo
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...
btDispatcher * m_dispatcher
virtual void setShapeIdentifiersA(int partId0, int index0)
setShapeIdentifiersA/B provides experimental support for per-triangle material / custom material comb...
DBVT_INLINE const btVector3 & Maxs() const
btAlignedObjectArray< btCollisionAlgorithm * > m_childCollisionAlgorithms
virtual void processCollision(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
btPersistentManifold * m_sharedManifold
btTransform & getWorldTransform()
btScalar m_closestPointDistanceThreshold
const btCollisionObjectWrapper * m_compoundColObjWrap
btTransform & getChildTransform(int index)
static btDbvtAabbMm FromMM(const btVector3 &mi, const btVector3 &mx)
const btCollisionObject * getCollisionObject() const
btCollisionObject can be used to manage collision detection objects.
bool(* btShapePairCallback)(const btCollisionShape *pShape0, const btCollisionShape *pShape1)
virtual void drawAabb(const btVector3 &from, const btVector3 &to, const btVector3 &color)
virtual void freeCollisionAlgorithm(void *ptr)=0
virtual void setShapeIdentifiersB(int partId1, int index1)
void setWorldTransform(const btTransform &worldTrans)
btVector3 can be used to represent 3D points and vectors.
#define ATTRIBUTE_ALIGNED16(a)
int size() const
return the number of elements in the array
btManifoldResult * m_resultOut
void Process(const btDbvtNode *leaf)
btManifoldArray manifoldArray
const btCollisionObject * getBody0Internal() const
void resize(int newsize, const T &fillData=T())
virtual int getDebugMode() const =0
void setBody1Wrap(const btCollisionObjectWrapper *obj1Wrap)
const btTransform & getWorldTransform() const
void preallocateChildAlgorithms(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap)
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
const btCollisionObjectWrapper * getBody1Wrap() const
btShapePairCallback gCompoundChildShapePairCallback
void btTransformAabb(const btVector3 &halfExtents, btScalar margin, const btTransform &t, btVector3 &aabbMinOut, btVector3 &aabbMaxOut)
The btCompoundShape allows to store multiple other btCollisionShapes This allows for moving concave c...
btCollisionAlgorithm ** m_childCollisionAlgorithms
void setBody0Wrap(const btCollisionObjectWrapper *obj0Wrap)
DBVT_PREFIX void collideTVNoStackAlloc(const btDbvtNode *root, const btDbvtVolume &volume, btNodeStack &stack, DBVT_IPOLICY) const
btCollisionShape * getChildShape(int index)
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 calculateTimeOfImpact(btCollisionObject *body0, btCollisionObject *body1, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
void ProcessChildShape(const btCollisionShape *childShape, int index)
const btCollisionObjectWrapper * m_otherObjWrap
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
const btCollisionShape * getCollisionShape() const
btDispatcher * m_dispatcher