SOFA API  c4ac86de
Open source framework for multi-physics simuation
sofa::core::collision::IntersectorMap Class Reference

#include <Intersection.h>

Detailed Description

Table storing associations between types of collision models and intersectors implementing intersection tests

This class uses the new ClassInfo metaclass to be able to recognize derived classes. So it is no longer necessary to register all derived collision models (i.e. an intersector registered for RayModel will also be used for RayPickIntersector).

Protected Attributes

InternalMap intersectorsMap
 
std::map< helper::TypeInfo, helper::TypeInfocastMap
 
std::set< const objectmodel::ClassInfo * > classes
 

Public Member Functions

template<class Model1 , class Model2 , class T >
void add (T *ptr)
 
template<class Model1 , class Model2 >
void ignore ()
 
 ~IntersectorMap ()
 
helper::TypeInfo getType (core::CollisionModel *model)
 
ElementIntersectorget (core::CollisionModel *model1, core::CollisionModel *model2, bool &swapModels)
 

Protected Member Functions

template<class Model1 , class Model2 >
void add_impl (ElementIntersector *intersector)
 
void add_impl (const objectmodel::ClassInfo &c1, const objectmodel::ClassInfo &c2, ElementIntersector *intersector)
 
void insert (const helper::TypeInfo &t1, const helper::TypeInfo &t2, ElementIntersector *intersector)
 

Attribute details

std::map< helper::TypeInfo, helper::TypeInfo > sofa::core::collision::IntersectorMap::castMap
protected
std::set< const objectmodel::ClassInfo* > sofa::core::collision::IntersectorMap::classes
protected
InternalMap sofa::core::collision::IntersectorMap::intersectorsMap
protected

Constructor details

sofa::core::collision::IntersectorMap::~IntersectorMap ( )

Function details

template<class Model1 , class Model2 , class T >
void sofa::core::collision::IntersectorMap::add ( T ptr)
template<class Model1 , class Model2 >
void sofa::core::collision::IntersectorMap::add_impl ( ElementIntersector intersector)
protected
void sofa::core::collision::IntersectorMap::add_impl ( const objectmodel::ClassInfo c1,
const objectmodel::ClassInfo c2,
ElementIntersector intersector 
)
protected
ElementIntersector * sofa::core::collision::IntersectorMap::get ( core::CollisionModel model1,
core::CollisionModel model2,
bool swapModels 
)
helper::TypeInfo sofa::core::collision::IntersectorMap::getType ( core::CollisionModel model)
template<class Model1 , class Model2 >
void sofa::core::collision::IntersectorMap::ignore ( )
void sofa::core::collision::IntersectorMap::insert ( const helper::TypeInfo t1,
const helper::TypeInfo t2,
ElementIntersector intersector 
)
protected