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

btSphereSphereCollisionAlgorithm provides sphere-sphere collision detection. More...

#include <btSphereSphereCollisionAlgorithm.h>

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

Classes

struct  CreateFunc
 

Public Member Functions

 btSphereSphereCollisionAlgorithm (btPersistentManifold *mf, const btCollisionAlgorithmConstructionInfo &ci, const btCollisionObjectWrapper *col0Wrap, const btCollisionObjectWrapper *col1Wrap)
 
 btSphereSphereCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo &ci)
 
virtual void processCollision (const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
 
virtual btScalar calculateTimeOfImpact (btCollisionObject *body0, btCollisionObject *body1, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
 
virtual void getAllContactManifolds (btManifoldArray &manifoldArray)
 
virtual ~btSphereSphereCollisionAlgorithm ()
 
- 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 Attributes

bool m_ownManifold
 
btPersistentManifoldm_manifoldPtr
 

Additional Inherited Members

- Protected Attributes inherited from btCollisionAlgorithm
btDispatcherm_dispatcher
 

Detailed Description

btSphereSphereCollisionAlgorithm provides sphere-sphere collision detection.

Other features are frame-coherency (persistent data) and collision response. Also provides the most basic sample for custom/user btCollisionAlgorithm

Definition at line 29 of file btSphereSphereCollisionAlgorithm.h.

Constructor & Destructor Documentation

btSphereSphereCollisionAlgorithm::btSphereSphereCollisionAlgorithm ( btPersistentManifold mf,
const btCollisionAlgorithmConstructionInfo ci,
const btCollisionObjectWrapper col0Wrap,
const btCollisionObjectWrapper col1Wrap 
)

Definition at line 22 of file btSphereSphereCollisionAlgorithm.cpp.

btSphereSphereCollisionAlgorithm::btSphereSphereCollisionAlgorithm ( const btCollisionAlgorithmConstructionInfo ci)
inline

Definition at line 37 of file btSphereSphereCollisionAlgorithm.h.

btSphereSphereCollisionAlgorithm::~btSphereSphereCollisionAlgorithm ( )
virtual

Definition at line 34 of file btSphereSphereCollisionAlgorithm.cpp.

Member Function Documentation

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

Implements btCollisionAlgorithm.

Definition at line 97 of file btSphereSphereCollisionAlgorithm.cpp.

virtual void btSphereSphereCollisionAlgorithm::getAllContactManifolds ( btManifoldArray manifoldArray)
inlinevirtual

Implements btCollisionAlgorithm.

Definition at line 44 of file btSphereSphereCollisionAlgorithm.h.

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

iff distance positive, don't generate a new contact

distance (negative means penetration)

point on A (worldspace) btVector3 pos0 = col0->getWorldTransform().getOrigin() - radius0 * normalOnSurfaceB; point on B (worldspace)

report a contact. internally this will be kept persistent, and contact reduction is done

Implements btCollisionAlgorithm.

Definition at line 43 of file btSphereSphereCollisionAlgorithm.cpp.

Member Data Documentation

btPersistentManifold* btSphereSphereCollisionAlgorithm::m_manifoldPtr
private

Definition at line 32 of file btSphereSphereCollisionAlgorithm.h.

bool btSphereSphereCollisionAlgorithm::m_ownManifold
private

Definition at line 31 of file btSphereSphereCollisionAlgorithm.h.


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