SOFA API  2aff2885
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 RayCollisionModel 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

◆ castMap

std::map< helper::TypeInfo, helper::TypeInfo > sofa::core::collision::IntersectorMap::castMap

◆ classes

std::set< const objectmodel::ClassInfo* > sofa::core::collision::IntersectorMap::classes

◆ intersectorsMap

InternalMap sofa::core::collision::IntersectorMap::intersectorsMap

Constructor details

◆ ~IntersectorMap()

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

Function details

◆ add()

template<class Model1 , class Model2 , class T >
void sofa::core::collision::IntersectorMap::add ( T ptr)

◆ add_impl() [1/2]

void sofa::core::collision::IntersectorMap::add_impl ( const objectmodel::ClassInfo c1,
const objectmodel::ClassInfo c2,
ElementIntersector intersector 

◆ add_impl() [2/2]

template<class Model1 , class Model2 >
void sofa::core::collision::IntersectorMap::add_impl ( ElementIntersector intersector)

◆ get()

ElementIntersector * sofa::core::collision::IntersectorMap::get ( core::CollisionModel model1,
core::CollisionModel model2,
bool swapModels 

◆ getType()

helper::TypeInfo sofa::core::collision::IntersectorMap::getType ( core::CollisionModel model)

◆ ignore()

template<class Model1 , class Model2 >
void sofa::core::collision::IntersectorMap::ignore

◆ insert()

void sofa::core::collision::IntersectorMap::insert ( const helper::TypeInfo t1,
const helper::TypeInfo t2,
ElementIntersector intersector