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

#include <DetectionOutput.h>

Generic description of a contact point, used for most collision models except special cases such as GPU-based collisions. More...

Detailed Description

Generic description of a contact point, used for most collision models except special cases such as GPU-based collisions.

Each contact point is described by :

  • elem: pair of colliding elements.
  • id: unique id of the contact for the given pair of collision models.
  • point: contact points on the surface of each model.
  • normal: normal of the contact, pointing outward from the first model.
  • value: signed distance (negative if objects are interpenetrating).
  • deltaT: estimated of time of contact.

The contact id is used to filter redundant contacts (only the contact with the smallest distance is kept), and to store persistant data over time for the response.

Public Attributes

std::pair< core::CollisionElementIterator, core::CollisionElementIteratorelem
 Pair of colliding elements. More...
 
ContactId id
 Unique id of the contact for the given pair of collision models. More...
 
Vector3 point [2]
 Contact points on the surface of each model. They are expressed in the local coordinate system of the model if any is defined.. More...
 
Vector3 normal
 Normal of the contact, pointing outward from the first model. More...
 
double value
 Store information for the collision Response. Depending on the kind of contact, can be a distance, or a pression, ... More...
 
double deltaT
 If using a continuous collision detection, estimated of time of contact. More...
 

Public Member Functions

 DetectionOutput ()
 

Attribute details

double sofa::core::collision::DetectionOutput::deltaT

If using a continuous collision detection, estimated of time of contact.

std::pair<core::CollisionElementIterator, core::CollisionElementIterator> sofa::core::collision::DetectionOutput::elem

Pair of colliding elements.

ContactId sofa::core::collision::DetectionOutput::id

Unique id of the contact for the given pair of collision models.

Vector3 sofa::core::collision::DetectionOutput::normal

Normal of the contact, pointing outward from the first model.

Vector3 sofa::core::collision::DetectionOutput::point[2]

Contact points on the surface of each model. They are expressed in the local coordinate system of the model if any is defined..

double sofa::core::collision::DetectionOutput::value

Store information for the collision Response. Depending on the kind of contact, can be a distance, or a pression, ...

Constructor details

sofa::core::collision::DetectionOutput::DetectionOutput ( )
inline