SOFA API  98f76541
Open source framework for multi-physics simuation
sofa::component::collision::detection::algorithm::MirrorIntersector Class Reference

#include <MirrorIntersector.h>

Inheritance diagram for sofa::component::collision::detection::algorithm::MirrorIntersector:

Public Attributes

core::collision::ElementIntersectorintersector { nullptr }
 

Public Member Functions

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

Attribute details

◆ intersector

core::collision::ElementIntersector* sofa::component::collision::detection::algorithm::MirrorIntersector::intersector { nullptr }

Function details

◆ beginIntersect()

int sofa::component::collision::detection::algorithm::MirrorIntersector::beginIntersect ( core::CollisionModel model1,
core::CollisionModel model2,
core::collision::DetectionOutputVector *&  contacts 
)
inlineoverridevirtual

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.

Implements sofa::core::collision::ElementIntersector.

◆ canIntersect() [1/2]

bool sofa::component::collision::detection::algorithm::MirrorIntersector::canIntersect ( core::CollisionElementIterator  elem1,
core::CollisionElementIterator  elem2 
)
overridevirtualdelete

◆ canIntersect() [2/2]

bool sofa::component::collision::detection::algorithm::MirrorIntersector::canIntersect ( core::CollisionElementIterator  elem1,
core::CollisionElementIterator  elem2,
const core::collision::Intersection currentIntersection 
)
inlineoverridevirtual

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

Implements sofa::core::collision::ElementIntersector.

◆ endIntersect()

int sofa::component::collision::detection::algorithm::MirrorIntersector::endIntersect ( core::CollisionModel model1,
core::CollisionModel model2,
core::collision::DetectionOutputVector contacts 
)
inlineoverridevirtual

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

Implements sofa::core::collision::ElementIntersector.

◆ intersect() [1/2]

int sofa::component::collision::detection::algorithm::MirrorIntersector::intersect ( core::CollisionElementIterator  elem1,
core::CollisionElementIterator  elem2,
core::collision::DetectionOutputVector contacts 
)
overridevirtualdelete

◆ intersect() [2/2]

int sofa::component::collision::detection::algorithm::MirrorIntersector::intersect ( core::CollisionElementIterator  elem1,
core::CollisionElementIterator  elem2,
core::collision::DetectionOutputVector contacts,
const core::collision::Intersection currentIntersection 
)
inlineoverridevirtual

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

Implements sofa::core::collision::ElementIntersector.

◆ name()

std::string sofa::component::collision::detection::algorithm::MirrorIntersector::name ( ) const
inlineoverridevirtual