Packageorg.MARS.dynamics.collision
Interfacepublic interface ICollisionFactory
ImplementorsSATCollisionFactory

Defines a structure to implement a collision detector factory.

The current release, 0.1, includes a SATCollisionFactory- all of the collision detection classes are SAT-based. The factory's job is to evaluate and return the correct IFineCollisionDetecto based upon 2 given ISimulatable instances. The entire collision detection scheme can be swapped easily by simply creating a new implementor of ICollisionFactory and have it return from a different pool of collision detectors.

See also

ICoarseCollisionDetector


Public Methods
 MethodDefined by
  
Gets the collision detector this factory determines based on the supplied elements
ICollisionFactory
Method detail
getCollisionDetector()method
public function getCollisionDetector(element1:Shape, element2:Shape):IFineCollisionDetector

Gets the collision detector this factory determines based on the supplied elements

Parameters
element1:Shape — first element to consider
 
element2:Shape — second element to consider

Returns
IFineCollisionDetector — implementor of IFineCollisionDetector to be used by the PhysicsEngine to ultimately determine collision and to generate contacts

See also

ICoarseCollisionDetector.getCandidates