Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::physics::collision::CollisionAlgorithmFunction< ShapeType1, ShapeType2, testPair > Class Template Reference

A class that detects collisions for a pair of shape types using a template function test. More...

#include <omPhysicsCollisionAlgorithmFunction.h>

Inheritance diagram for om::physics::collision::CollisionAlgorithmFunction< ShapeType1, ShapeType2, testPair >:
om::physics::collision::CollisionAlgorithm

Public Member Functions

 CollisionAlgorithmFunction ()
 Create a new function-based collision algorithm. More...
 
virtual void testPairs (const CollisionPair *pairs, Size numPairs, const CollisionRequest &request, const CollisionNarrowphase &narrowphase, CollisionResultSet &results)
 Test the specified array of pairs for collisions and add the results to the result set. More...
 
- Public Member Functions inherited from om::physics::collision::CollisionAlgorithm
virtual ~CollisionAlgorithm ()
 Destroy this algorithm. More...
 
const ShapeTypegetShapeType1 () const
 Return an object representing the first shape type that this algorithm operates on. More...
 
const ShapeTypegetShapeType2 () const
 Return an object representing the second shape type that this algorithm operates on. More...
 

Additional Inherited Members

- Protected Member Functions inherited from om::physics::collision::CollisionAlgorithm
 CollisionAlgorithm (const ShapeType *newShapeType1, const ShapeType *newShapeType2)
 Create a new collision algorithm which operates on the specified collision shape types. More...
 

Detailed Description

template<typename ShapeType1, typename ShapeType2, void(*)(const CollisionPair &, const CollisionRequest &, CollisionResultSet &) testPair>
class om::physics::collision::CollisionAlgorithmFunction< ShapeType1, ShapeType2, testPair >

A class that detects collisions for a pair of shape types using a template function test.

Constructor & Destructor Documentation

template<typename ShapeType1 , typename ShapeType2 , void(*)(const CollisionPair &, const CollisionRequest &, CollisionResultSet &) testPair>
om::physics::collision::CollisionAlgorithmFunction< ShapeType1, ShapeType2, testPair >::CollisionAlgorithmFunction ( )
inline

Create a new function-based collision algorithm.

Member Function Documentation

template<typename ShapeType1 , typename ShapeType2 , void(*)(const CollisionPair &, const CollisionRequest &, CollisionResultSet &) testPair>
virtual void om::physics::collision::CollisionAlgorithmFunction< ShapeType1, ShapeType2, testPair >::testPairs ( const CollisionPair pairs,
Size  numPairs,
const CollisionRequest request,
const CollisionNarrowphase narrowphase,
CollisionResultSet results 
)
inlinevirtual

Test the specified array of pairs for collisions and add the results to the result set.

The pairs are assumed to have the same shape types as this algorithm and so can be safely cast to the shape base class.

The method finds any collisions among the pairs and adds the resulting collision points to the output collision result set.

Implements om::physics::collision::CollisionAlgorithm.


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