Bullet Collision Detection & Physics Library
|
Go to the documentation of this file.
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)
btDispatcher * m_dispatcher
virtual void setShapeIdentifiersB(int partId1, int index1)
btCollisionObject can be used to manage collision detection objects.
btCompoundLeafCallback(const btCollisionObjectWrapper *compoundObjWrap, const btCollisionObjectWrapper *otherObjWrap, btDispatcher *dispatcher, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut, btCollisionAlgorithm **childCollisionAlgorithms, btPersistentManifold *sharedManifold)
btTransform & getChildTransform(int index)
btScalar calculateTimeOfImpact(btCollisionObject *body0, btCollisionObject *body1, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
btDispatcher * m_dispatcher
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
void removeChildAlgorithms()
The btDispatcher interface class can be used in combination with broadphase to dispatch calculations ...
const btDispatcherInfo & m_dispatchInfo
const btCollisionObject * getBody0Internal() const
void setBody1Wrap(const btCollisionObjectWrapper *obj1Wrap)
const DBVT_INLINE btVector3 & Maxs() const
bool(* btShapePairCallback)(const btCollisionShape *pShape0, const btCollisionShape *pShape1)
virtual int getDebugMode() const =0
class btIDebugDraw * m_debugDraw
const btTransform & getWorldTransform() const
void preallocateChildAlgorithms(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap)
virtual void freeCollisionAlgorithm(void *ptr)=0
btCollisionAlgorithm is an collision interface that is compatible with the Broadphase and btDispatche...
int m_compoundShapeRevision
const btCollisionObjectWrapper * getBody1Wrap() const
btTransform & getWorldTransform()
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
void setBody0Wrap(const btCollisionObjectWrapper *obj0Wrap)
The btDbvt class implements a fast dynamic bounding volume tree based on axis aligned bounding boxes ...
btManifoldResult is a helper class to manage contact results.
bool TestAabbAgainstAabb2(const btVector3 &aabbMin1, const btVector3 &aabbMax1, const btVector3 &aabbMin2, const btVector3 &aabbMax2)
conservative test for overlap between two aabbs
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
const btCollisionShape * getCollisionShape() const
void resize(int newsize, const T &fillData=T())
const DBVT_INLINE btVector3 & Mins() const
virtual ~btCompoundCollisionAlgorithm()
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.
btManifoldArray manifoldArray
void setWorldTransform(const btTransform &worldTrans)
void Process(const btDbvtNode *leaf)
const btCollisionObject * getCollisionObject() const
const btCollisionObjectWrapper * getBody0Wrap() const
btVector3 can be used to represent 3D points and vectors.
btPersistentManifold * m_sharedManifold
btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping...
static btDbvtAabbMm FromMM(const btVector3 &mi, const btVector3 &mx)
virtual btCollisionAlgorithm * findAlgorithm(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, btPersistentManifold *sharedManifold, ebtDispatcherQueryType queryType)=0
const btCollisionObjectWrapper * m_compoundColObjWrap
void setPersistentManifold(btPersistentManifold *manifoldPtr)
#define ATTRIBUTE_ALIGNED16(a)
virtual void processCollision(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
The btCompoundShape allows to store multiple other btCollisionShapes This allows for moving concave c...
DBVT_PREFIX void collideTVNoStackAlloc(const btDbvtNode *root, const btDbvtVolume &volume, btNodeStack &stack, DBVT_IPOLICY) const
btManifoldResult * m_resultOut
void btTransformAabb(const btVector3 &halfExtents, btScalar margin, const btTransform &t, btVector3 &aabbMinOut, btVector3 &aabbMaxOut)
btCompoundCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo &ci, const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, bool isSwapped)
int getNumChildShapes() const
btShapePairCallback gCompoundChildShapePairCallback
void ProcessChildShape(const btCollisionShape *childShape, int index)
void refreshContactPoints()
This class is not enabled yet (work-in-progress) to more aggressively activate objects.
const btCollisionObjectWrapper * m_otherObjWrap
class btPersistentManifold * m_sharedManifold
btAlignedObjectArray< btCollisionAlgorithm * > m_childCollisionAlgorithms
btCollisionAlgorithm ** m_childCollisionAlgorithms
virtual void setShapeIdentifiersA(int partId0, int index0)
setShapeIdentifiersA/B provides experimental support for per-triangle material / custom material comb...
btCollisionShape * getChildShape(int index)
virtual void drawAabb(const btVector3 &from, const btVector3 &to, const btVector3 &color)
btScalar m_closestPointDistanceThreshold
int size() const
return the number of elements in the array
const btCollisionShape * getCollisionShape() const