Bullet Collision Detection & Physics Library
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
btCompoundCollisionAlgorithm Class Reference

btCompoundCollisionAlgorithm supports collision between CompoundCollisionShapes and other collision shapes More...

#include <btCompoundCollisionAlgorithm.h>

Inheritance diagram for btCompoundCollisionAlgorithm:
Inheritance graph
[legend]
Collaboration diagram for btCompoundCollisionAlgorithm:
Collaboration graph
[legend]

Classes

struct  CreateFunc
 
struct  SwappedCreateFunc
 

Public Member Functions

 btCompoundCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo &ci, const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, bool isSwapped)
 
virtual ~btCompoundCollisionAlgorithm ()
 
btCollisionAlgorithmgetChildAlgorithm (int n) const
 
virtual void processCollision (const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
 
btScalar calculateTimeOfImpact (btCollisionObject *body0, btCollisionObject *body1, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
 
virtual void getAllContactManifolds (btManifoldArray &manifoldArray)
 
- Public Member Functions inherited from btActivatingCollisionAlgorithm
 btActivatingCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo &ci)
 
 btActivatingCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo &ci, const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap)
 
virtual ~btActivatingCollisionAlgorithm ()
 
- Public Member Functions inherited from btCollisionAlgorithm
 btCollisionAlgorithm ()
 
 btCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo &ci)
 
virtual ~btCollisionAlgorithm ()
 

Private Member Functions

void removeChildAlgorithms ()
 
void preallocateChildAlgorithms (const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap)
 

Private Attributes

btAlignedObjectArray
< btCollisionAlgorithm * > 
m_childCollisionAlgorithms
 
bool m_isSwapped
 
class btPersistentManifoldm_sharedManifold
 
bool m_ownsManifold
 
int m_compoundShapeRevision
 

Additional Inherited Members

- Protected Attributes inherited from btCollisionAlgorithm
btDispatcherm_dispatcher
 

Detailed Description

btCompoundCollisionAlgorithm supports collision between CompoundCollisionShapes and other collision shapes

Definition at line 37 of file btCompoundCollisionAlgorithm.h.

Constructor & Destructor Documentation

btCompoundCollisionAlgorithm::btCompoundCollisionAlgorithm ( const btCollisionAlgorithmConstructionInfo ci,
const btCollisionObjectWrapper body0Wrap,
const btCollisionObjectWrapper body1Wrap,
bool  isSwapped 
)

Definition at line 28 of file btCompoundCollisionAlgorithm.cpp.

btCompoundCollisionAlgorithm::~btCompoundCollisionAlgorithm ( )
virtual

Definition at line 87 of file btCompoundCollisionAlgorithm.cpp.

Member Function Documentation

btScalar btCompoundCollisionAlgorithm::calculateTimeOfImpact ( btCollisionObject body0,
btCollisionObject body1,
const btDispatcherInfo dispatchInfo,
btManifoldResult resultOut 
)
virtual

Implements btCollisionAlgorithm.

Definition at line 324 of file btCompoundCollisionAlgorithm.cpp.

virtual void btCompoundCollisionAlgorithm::getAllContactManifolds ( btManifoldArray manifoldArray)
inlinevirtual

Implements btCollisionAlgorithm.

Definition at line 68 of file btCompoundCollisionAlgorithm.h.

btCollisionAlgorithm* btCompoundCollisionAlgorithm::getChildAlgorithm ( int  n) const
inline

Definition at line 58 of file btCompoundCollisionAlgorithm.h.

void btCompoundCollisionAlgorithm::preallocateChildAlgorithms ( const btCollisionObjectWrapper body0Wrap,
const btCollisionObjectWrapper body1Wrap 
)
private

Definition at line 45 of file btCompoundCollisionAlgorithm.cpp.

void btCompoundCollisionAlgorithm::processCollision ( const btCollisionObjectWrapper body0Wrap,
const btCollisionObjectWrapper body1Wrap,
const btDispatcherInfo dispatchInfo,
btManifoldResult resultOut 
)
virtual

btCompoundShape might have changed: /make sure the internal child collision algorithm caches are still valid

clear and update all

we need to refresh all contact manifolds note that we should actually recursively traverse all children, btCompoundShape can nested more then 1 level deep so we should add a 'refreshManifolds' in the btCollisionAlgorithm

Implements btCollisionAlgorithm.

Definition at line 216 of file btCompoundCollisionAlgorithm.cpp.

void btCompoundCollisionAlgorithm::removeChildAlgorithms ( )
private

Definition at line 73 of file btCompoundCollisionAlgorithm.cpp.

Member Data Documentation

btAlignedObjectArray<btCollisionAlgorithm*> btCompoundCollisionAlgorithm::m_childCollisionAlgorithms
private

Definition at line 39 of file btCompoundCollisionAlgorithm.h.

int btCompoundCollisionAlgorithm::m_compoundShapeRevision
private

Definition at line 46 of file btCompoundCollisionAlgorithm.h.

bool btCompoundCollisionAlgorithm::m_isSwapped
private

Definition at line 40 of file btCompoundCollisionAlgorithm.h.

bool btCompoundCollisionAlgorithm::m_ownsManifold
private

Definition at line 43 of file btCompoundCollisionAlgorithm.h.

class btPersistentManifold* btCompoundCollisionAlgorithm::m_sharedManifold
private

Definition at line 42 of file btCompoundCollisionAlgorithm.h.


The documentation for this class was generated from the following files: