sofa::core::componentmodel::collision::Contact Class Reference

contact response component handling the response between a pair of models More...

#include <Contact.h>

Inheritance diagram for sofa::core::componentmodel::collision::Contact:

Inheritance graph
[legend]
Collaboration diagram for sofa::core::componentmodel::collision::Contact:

Collaboration graph
[legend]

Public Types

typedef helper::Factory
< std::string, Contact,
std::pair< std::pair
< core::CollisionModel
*, core::CollisionModel * >
, Intersection * > > 
Factory

Public Member Functions

virtual ~Contact ()
 Destructor.
virtual std::pair
< core::CollisionModel
*, core::CollisionModel * > 
getCollisionModels ()=0
 Get the pair of collision models which are in contact.
virtual void setDetectionOutputs (DetectionOutputVector *outputs)=0
 Set the generic description of a contact point.
virtual void createResponse (objectmodel::BaseContext *group)=0
virtual void removeResponse ()=0
virtual bool keepAlive ()
 Return true if this contact should be kept alive, even if objects are no longer in collision.
virtual void setKeepAlive (bool)
 Control the keepAlive flag of the contact. Note that not all contacts support this method.
virtual void getCorrespondingCollisionModels (const core::componentmodel::behavior::InteractionForceField *, core::CollisionModel *&, core::CollisionModel *&)

Static Public Member Functions

static Contact * Create (const std::string &type, core::CollisionModel *model1, core::CollisionModel *model2, Intersection *intersectionMethod)
 Create a new contact given 2 collision elements and an intersection method.
template<class RealContact >
static void create (RealContact *&obj, std::pair< std::pair< core::CollisionModel *, core::CollisionModel * >, Intersection * > arg)

Detailed Description

contact response component handling the response between a pair of models

  1. Persistent between iterations

  1. New id data in DetectionOutput allow to keep an history of a contact

-InteractionForceField, Constraint, ...

Definition at line 64 of file Contact.h.


Member Typedef Documentation

Definition at line 88 of file Contact.h.


Constructor & Destructor Documentation

virtual sofa::core::componentmodel::collision::Contact::~Contact (  )  [inline, virtual]

Destructor.

Definition at line 69 of file Contact.h.


Member Function Documentation

template<class RealContact >
static void sofa::core::componentmodel::collision::Contact::create ( RealContact *&  obj,
std::pair< std::pair< core::CollisionModel *, core::CollisionModel * >, Intersection * >  arg 
) [inline, static]

Definition at line 96 of file Contact.h.

Contact * sofa::core::componentmodel::collision::Contact::Create ( const std::string &  type,
core::CollisionModel *  model1,
core::CollisionModel *  model2,
Intersection *  intersectionMethod 
) [static]

Create a new contact given 2 collision elements and an intersection method.

Definition at line 46 of file Contact.cpp.

References sofa::helper::Factory< TKey, TObject, TArgument >::CreateObject().

Referenced by sofa::component::collision::DefaultContactManager::createContacts().

virtual void sofa::core::componentmodel::collision::Contact::createResponse ( objectmodel::BaseContext *  group  )  [pure virtual]

virtual std::pair< core::CollisionModel*, core::CollisionModel* > sofa::core::componentmodel::collision::Contact::getCollisionModels (  )  [pure virtual]

virtual void sofa::core::componentmodel::collision::Contact::getCorrespondingCollisionModels ( const core::componentmodel::behavior::InteractionForceField *  ,
core::CollisionModel *&  ,
core::CollisionModel *&   
) [inline, virtual]

virtual bool sofa::core::componentmodel::collision::Contact::keepAlive (  )  [inline, virtual]

Return true if this contact should be kept alive, even if objects are no longer in collision.

Definition at line 82 of file Contact.h.

virtual void sofa::core::componentmodel::collision::Contact::removeResponse (  )  [pure virtual]

virtual void sofa::core::componentmodel::collision::Contact::setDetectionOutputs ( DetectionOutputVector *  outputs  )  [pure virtual]

virtual void sofa::core::componentmodel::collision::Contact::setKeepAlive ( bool   )  [inline, virtual]

Control the keepAlive flag of the contact. Note that not all contacts support this method.

Definition at line 85 of file Contact.h.


The documentation for this class was generated from the following files:

Generated on Sun Nov 23 04:23:35 2008 for Sofa by  doxygen 1.5.7.1