SOFA API  cba138a4
Open source framework for multi-physics simuation
sofa::core::collision::ElementIntersector Class Referenceabstract

#include <Intersection.h>

Inheritance diagram for sofa::core::collision::ElementIntersector:

Public Member Functions

virtual ~ElementIntersector ()
 
virtual bool canIntersect (core::CollisionElementIterator elem1, core::CollisionElementIterator elem2)=0
 Test if 2 elements can collide. Note that this can be conservative (i.e. return true even when no collision is present) More...
 
virtual int beginIntersect (core::CollisionModel *model1, core::CollisionModel *model2, DetectionOutputVector *&contacts)=0
 
virtual int intersect (core::CollisionElementIterator elem1, core::CollisionElementIterator elem2, DetectionOutputVector *contacts)=0
 Compute the intersection between 2 elements. Return the number of contacts written in the contacts vector. More...
 
virtual int endIntersect (core::CollisionModel *model1, core::CollisionModel *model2, DetectionOutputVector *contacts)=0
 End intersection tests between two collision models. Return the number of contacts written in the contacts vector. More...
 
virtual std::string name () const =0
 

Constructor details

virtual sofa::core::collision::ElementIntersector::~ElementIntersector ( )
inlinevirtual

Function details

virtual int sofa::core::collision::ElementIntersector::beginIntersect ( core::CollisionModel model1,
core::CollisionModel model2,
DetectionOutputVector *&  contacts 
)
pure virtual

Begin intersection tests between two collision models. Return the number of contacts written in the contacts vector. If the given contacts vector is nullptr, then this method should allocate it.

Implemented in sofa::component::collision::MirrorIntersector, and sofa::core::collision::MemberElementIntersector< Elem1, Elem2, T >.

virtual bool sofa::core::collision::ElementIntersector::canIntersect ( core::CollisionElementIterator  elem1,
core::CollisionElementIterator  elem2 
)
pure virtual

Test if 2 elements can collide. Note that this can be conservative (i.e. return true even when no collision is present)

Implemented in sofa::component::collision::MirrorIntersector, and sofa::core::collision::MemberElementIntersector< Elem1, Elem2, T >.

virtual int sofa::core::collision::ElementIntersector::endIntersect ( core::CollisionModel model1,
core::CollisionModel model2,
DetectionOutputVector contacts 
)
pure virtual

End intersection tests between two collision models. Return the number of contacts written in the contacts vector.

Implemented in sofa::core::collision::MemberElementIntersector< Elem1, Elem2, T >, and sofa::component::collision::MirrorIntersector.

virtual int sofa::core::collision::ElementIntersector::intersect ( core::CollisionElementIterator  elem1,
core::CollisionElementIterator  elem2,
DetectionOutputVector contacts 
)
pure virtual

Compute the intersection between 2 elements. Return the number of contacts written in the contacts vector.

Implemented in sofa::core::collision::MemberElementIntersector< Elem1, Elem2, T >, and sofa::component::collision::MirrorIntersector.

virtual std::string sofa::core::collision::ElementIntersector::name ( ) const
pure virtual