Back to index

supertuxkart  0.5+dfsg1
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
btBoxBoxCollisionAlgorithm Class Reference

box-box collision detection More...

#include <btBoxBoxCollisionAlgorithm.h>

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

List of all members.

Classes

struct  CreateFunc

Public Member Functions

 btBoxBoxCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo &ci)
virtual void processCollision (btCollisionObject *body0, btCollisionObject *body1, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
virtual btScalar calculateTimeOfImpact (btCollisionObject *body0, btCollisionObject *body1, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
 btBoxBoxCollisionAlgorithm (btPersistentManifold *mf, const btCollisionAlgorithmConstructionInfo &ci, btCollisionObject *body0, btCollisionObject *body1)
virtual ~btBoxBoxCollisionAlgorithm ()

Protected Member Functions

int getDispatcherId ()

Protected Attributes

btDispatcherm_dispatcher

Private Attributes

bool m_ownManifold
btPersistentManifold * m_manifoldPtr

Detailed Description

box-box collision detection

Definition at line 27 of file btBoxBoxCollisionAlgorithm.h.


Constructor & Destructor Documentation

Definition at line 33 of file btBoxBoxCollisionAlgorithm.h.

Here is the caller graph for this function:

btBoxBoxCollisionAlgorithm::btBoxBoxCollisionAlgorithm ( btPersistentManifold *  mf,
const btCollisionAlgorithmConstructionInfo ci,
btCollisionObject *  body0,
btCollisionObject *  body1 
)

Definition at line 24 of file btBoxBoxCollisionAlgorithm.cpp.

Here is the call graph for this function:

Definition at line 36 of file btBoxBoxCollisionAlgorithm.cpp.

Here is the call graph for this function:


Member Function Documentation

btScalar btBoxBoxCollisionAlgorithm::calculateTimeOfImpact ( btCollisionObject *  body0,
btCollisionObject *  body1,
const btDispatcherInfo dispatchInfo,
btManifoldResult resultOut 
) [virtual]

Implements btCollisionAlgorithm.

Definition at line 81 of file btBoxBoxCollisionAlgorithm.cpp.

{
       //not yet
       return 1.f;
}
int btCollisionAlgorithm::getDispatcherId ( ) [protected, inherited]
void btBoxBoxCollisionAlgorithm::processCollision ( btCollisionObject *  body0,
btCollisionObject *  body1,
const btDispatcherInfo dispatchInfo,
btManifoldResult resultOut 
) [virtual]

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

Implements btCollisionAlgorithm.

Definition at line 45 of file btBoxBoxCollisionAlgorithm.cpp.

{
       if (!m_manifoldPtr)
              return;

       btCollisionObject*   col0 = body0;
       btCollisionObject*   col1 = body1;
       btBoxShape* box0 = (btBoxShape*)col0->getCollisionShape();
       btBoxShape* box1 = (btBoxShape*)col1->getCollisionShape();



       resultOut->setPersistentManifold(m_manifoldPtr);
#ifndef USE_PERSISTENT_CONTACTS    
       m_manifoldPtr->clearManifold();
#endif //USE_PERSISTENT_CONTACTS

       btDiscreteCollisionDetectorInterface::ClosestPointInput input;
       input.m_maximumDistanceSquared = 1e30f;
       input.m_transformA = body0->getWorldTransform();
       input.m_transformB = body1->getWorldTransform();

       btBoxBoxDetector detector(box0,box1);
       detector.getClosestPoints(input,*resultOut,dispatchInfo.m_debugDraw);

#ifdef USE_PERSISTENT_CONTACTS
       //  refreshContactPoints is only necessary when using persistent contact points. otherwise all points are newly added
       if (m_ownManifold)
       {
              resultOut->refreshContactPoints();
       }
#endif //USE_PERSISTENT_CONTACTS

}

Here is the call graph for this function:


Member Data Documentation

Definition at line 57 of file btCollisionAlgorithm.h.

btPersistentManifold* btBoxBoxCollisionAlgorithm::m_manifoldPtr [private]

Definition at line 30 of file btBoxBoxCollisionAlgorithm.h.

Definition at line 29 of file btBoxBoxCollisionAlgorithm.h.


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