SOFA API  c76874b7
Open source framework for multi-physics simuation
sofa::component::collision::BaseContactMapper< TDataTypes > Class Template Referenceabstract

#include <BaseContactMapper.h>

Base class common to all mappers able to provide a MechanicalState of a given type. More...

Inheritance diagram for sofa::component::collision::BaseContactMapper< TDataTypes >:

Detailed Description

template<class TDataTypes>
class sofa::component::collision::BaseContactMapper< TDataTypes >

Base class common to all mappers able to provide a MechanicalState of a given type.

Public Member Functions

virtual ~BaseContactMapper ()
 
virtual MMechanicalStatecreateMapping (const char *name="contactPoints")=0
 
virtual void cleanup ()=0
 
virtual void resize (int size)=0
 
virtual int addPoint (const Coord &, int, Real &)
 Adding a point of the global referentiel to the mapping. More...
 
virtual int addBaryPoint (const sofa::defaulttype::Vector3 &, int, Real &)
 Adding a point of the local referentiel(barycentric coordinate) to the mapping. More...
 
virtual int addPointB (const Coord &P, int elementId, Real &r, const sofa::defaulttype::Vector3 &)
 
int addPointB (const Coord &P, int elementId, Real &r)
 
virtual void update ()=0
 
virtual void updateXfree ()=0
 

Static Public Member Functions

static BaseContactMapper< DataTypes > * Create (core::CollisionModel *model, const std::string &name=std::string("default"))
 
template<class TCollisionModel >
static ContactMapper< TCollisionModel, DataTypes > * create (ContactMapper< TCollisionModel, DataTypes > *, core::CollisionModel *arg)
 

Constructor details

template<class TDataTypes>
virtual sofa::component::collision::BaseContactMapper< TDataTypes >::~BaseContactMapper ( )
inlinevirtual

Function details

template<class TDataTypes>
virtual int sofa::component::collision::BaseContactMapper< TDataTypes >::addBaryPoint ( const sofa::defaulttype::Vector3 &  ,
int  ,
Real  
)
inlinevirtual

Adding a point of the local referentiel(barycentric coordinate) to the mapping.

template<class TDataTypes>
virtual int sofa::component::collision::BaseContactMapper< TDataTypes >::addPoint ( const Coord ,
int  ,
Real  
)
inlinevirtual

Adding a point of the global referentiel to the mapping.

Reimplemented in sofa::component::collision::ContactMapper< CapsuleCollisionModel< sofa::defaulttype::Vec3Types >, DataTypes >, sofa::component::collision::ContactMapper< SphereCollisionModel< sofa::defaulttype::Vec3Types >, DataTypes >, sofa::component::collision::IdentityContactMapper< TCollisionModel, typename TCollisionModel::InDataTypes >, sofa::component::collision::ContactMapper< TriangleCollisionModel< sofa::defaulttype::Vec3Types >, DataTypes >, sofa::component::collision::ContactMapper< LineCollisionModel< sofa::defaulttype::Vec3Types >, DataTypes >, sofa::component::collision::RigidContactMapper< TCollisionModel, DataTypes >, sofa::component::collision::RigidContactMapper< RigidSphereModel, TVec3Types >, sofa::component::collision::RigidContactMapper< CapsuleCollisionModel< sofa::defaulttype::Rigid3Types >, TVec3Types >, sofa::component::collision::RigidContactMapper< CylinderCollisionModel< sofa::defaulttype::Rigid3Types >, TVec3Types >, sofa::component::collision::RigidContactMapper< OBBCollisionModel< sofa::defaulttype::Rigid3Types >, TVec3Types >, sofa::component::collision::IdentityContactMapper< TCollisionModel, DataTypes >, sofa::component::collision::IdentityContactMapper< PointCollisionModel< sofa::defaulttype::Vec3Types >, DataTypes >, sofa::component::collision::IdentityContactMapper< SphereCollisionModel< sofa::defaulttype::Vec3Types >, DataTypes >, and sofa::component::collision::SubsetContactMapper< TCollisionModel, DataTypes >.

template<class TDataTypes>
virtual int sofa::component::collision::BaseContactMapper< TDataTypes >::addPointB ( const Coord P,
int  elementId,
Real r,
const sofa::defaulttype::Vector3 &   
)
inlinevirtual

Adding a point of the global referentiel to the mapping, also giving the local referentiel Note that it cannot have the same name as addPoint otherwise it creates errors when a subclass only implement the version without barycoords

template<class TDataTypes>
int sofa::component::collision::BaseContactMapper< TDataTypes >::addPointB ( const Coord P,
int  elementId,
Real r 
)
inline
template<class TDataTypes>
virtual void sofa::component::collision::BaseContactMapper< TDataTypes >::cleanup ( )
pure virtual
template<class TDataTypes>
static BaseContactMapper<DataTypes>* sofa::component::collision::BaseContactMapper< TDataTypes >::Create ( core::CollisionModel model,
const std::string &  name = std::string("default") 
)
inlinestatic
template<class TDataTypes>
template<class TCollisionModel >
static ContactMapper<TCollisionModel, DataTypes>* sofa::component::collision::BaseContactMapper< TDataTypes >::create ( ContactMapper< TCollisionModel, DataTypes > *  ,
core::CollisionModel arg 
)
inlinestatic
template<class TDataTypes>
virtual MMechanicalState* sofa::component::collision::BaseContactMapper< TDataTypes >::createMapping ( const char *  name = "contactPoints")
pure virtual
template<class TDataTypes>
virtual void sofa::component::collision::BaseContactMapper< TDataTypes >::resize ( int  size)
pure virtual
template<class TDataTypes>
virtual void sofa::component::collision::BaseContactMapper< TDataTypes >::update ( )
pure virtual
template<class TDataTypes>
virtual void sofa::component::collision::BaseContactMapper< TDataTypes >::updateXfree ( )
pure virtual