40 #ifndef _physicscollisiondispatcher_cpp
41 #define _physicscollisiondispatcher_cpp
43 #include "Physics/collisiondispatcher.h.cpp"
44 #include "Physics/physicsmanager.h"
45 #include "Physics/collision.h"
57 btCollisionDispatcher(CollisionConfig),
69 void* ToReturn = btCollisionDispatcher::allocateCollisionAlgorithm(size);
70 btCollisionAlgorithm* Casted = (btCollisionAlgorithm*)ToReturn;
76 btCollisionAlgorithm* Casted = (btCollisionAlgorithm*)ptr;
82 if(Casted == (*QueIt))
85 btCollisionDispatcher::freeCollisionAlgorithm(ptr);
93 if(Casted == (*ColIt).second->InternalAlgo)
98 delete (*ColIt).second;
103 btCollisionDispatcher::freeCollisionAlgorithm(ptr);
177 SpuGatheringCollisionDispatcher(ThreadInterface,MaxNumTasks,CollisionConfig)
190 void* ToReturn = btCollisionDispatcher::allocateCollisionAlgorithm(size);
191 btCollisionAlgorithm* Casted = (btCollisionAlgorithm*)ToReturn;
197 btCollisionAlgorithm* Casted = (btCollisionAlgorithm*)ptr;
203 if(Casted == (*QueIt))
206 btCollisionDispatcher::freeCollisionAlgorithm(ptr);
214 if(Casted == (*ColIt).second->InternalAlgo)
219 delete (*ColIt).second;
224 btCollisionDispatcher::freeCollisionAlgorithm(ptr);
void freeCollisionAlgorithm(void *ptr)
Frees up the space belonging to a Collision Algorithm that is no longer needed.
virtual ~ParallelCollisionDispatcher()
Class destructor.
void * allocateCollisionAlgorithm(int size)
Allocates space for a new Collision Algorithm between two objects.
AlgoList AlgoCreationQueue
A list of all the algorithms that have been created and need processing.
void freeCollisionAlgorithm(void *ptr)
Frees up the space belonging to a Collision Algorithm that is no longer needed.
AlgoList * GetAlgoCreationQueue()
Gets the list of algorithms that have been created and need processing.
ParallelCollisionDispatcher(PhysicsManager *PhysMan, btThreadSupportInterface *ThreadInterface, unsigned int MaxNumTasks, btCollisionConfiguration *CollisionConfig)
Class constructor.
PhysicsManager * PhysMan
Physics Manager.
CollisionMap::iterator CollisionMapIterator
Iterator type for sorted Collision instances.
std::list< btCollisionAlgorithm * > AlgoList
Convenience datatype for a collection of Collision Algorithms.
This is simply a place for storing all the Physics Related functions.
PhysicsManager * PhysMan
Physics Manager.
AlgoList * GetAlgoCreationQueue()
Gets the list of algorithms that have been created and need processing.
The bulk of the engine components go in this namspace.
AlgoList AlgoCreationQueue
A list of all the algorithms that have been created and need processing.
virtual ~CollisionDispatcher()
Class destructor.
void * allocateCollisionAlgorithm(int size)
Allocates space for a new Collision Algorithm between two objects.
CollisionMap Collisions
A container tracking all of the existing collisions in the physics world.
CollisionDispatcher(PhysicsManager *PhysMan, btCollisionConfiguration *CollisionConfig)
Class constructor.