Bullet Collision Detection & Physics Library
Classes | Public Member Functions | Protected Member Functions | Protected 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 ()
 

Protected Member Functions

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

Protected Attributes

btAlignedObjectArray< btCollisionAlgorithm * > m_childCollisionAlgorithms
 
bool m_isSwapped
 
class btPersistentManifoldm_sharedManifold
 
bool m_ownsManifold
 
int m_compoundShapeRevision
 
- 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.

Reimplemented in btCompoundCompoundCollisionAlgorithm.

Definition at line 327 of file btCompoundCollisionAlgorithm.cpp.

virtual void btCompoundCollisionAlgorithm::getAllContactManifolds ( btManifoldArray manifoldArray)
inlinevirtual

Implements btCollisionAlgorithm.

Reimplemented in btCompoundCompoundCollisionAlgorithm.

Definition at line 69 of file btCompoundCollisionAlgorithm.h.

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

Definition at line 59 of file btCompoundCollisionAlgorithm.h.

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

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.

Reimplemented in btCompoundCompoundCollisionAlgorithm.

Definition at line 216 of file btCompoundCollisionAlgorithm.cpp.

void btCompoundCollisionAlgorithm::removeChildAlgorithms ( )
protected

Definition at line 73 of file btCompoundCollisionAlgorithm.cpp.

Member Data Documentation

btAlignedObjectArray<btCollisionAlgorithm*> btCompoundCollisionAlgorithm::m_childCollisionAlgorithms
protected

Definition at line 40 of file btCompoundCollisionAlgorithm.h.

int btCompoundCollisionAlgorithm::m_compoundShapeRevision
protected

Definition at line 47 of file btCompoundCollisionAlgorithm.h.

bool btCompoundCollisionAlgorithm::m_isSwapped
protected

Definition at line 41 of file btCompoundCollisionAlgorithm.h.

bool btCompoundCollisionAlgorithm::m_ownsManifold
protected

Definition at line 44 of file btCompoundCollisionAlgorithm.h.

class btPersistentManifold* btCompoundCollisionAlgorithm::m_sharedManifold
protected

Definition at line 43 of file btCompoundCollisionAlgorithm.h.


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