SOFA API  6a688117
Open source framework for multi-physics simuation
sofa::component::topology::PointSetGeometryAlgorithms< DataTypes > Class Template Reference

#include <PointSetTopologyAlgorithms.h>

Inheritance diagram for sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >:

Detailed Description

template<class DataTypes>
class sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >

A class that can perform some geometric computation on a set of points.

Protected Attributes

sofa::core::behavior::MechanicalState< DataTypes > * object
 
sofa::core::topology::BaseMeshTopologym_topology
 
Data< floatd_showIndicesScale
 Debug : scale for view topology indices. More...
 
Data< boold_showPointIndices
 
Data< std::string > d_tagMechanics
 Tage of the Mechanical State associated with the vertex position. More...
 
SingleLink< PointSetGeometryAlgorithms< DataTypes >, sofa::core::topology::BaseMeshTopology, BaseLink::FLAG_STOREPATH|BaseLink::FLAG_STRONGLINKl_topology
 Link to be set to the topology container in the component graph. More...
 

Public Member Functions

 SOFA_CLASS (SOFA_TEMPLATE(PointSetGeometryAlgorithms, DataTypes), core::topology::GeometryAlgorithms)
 
Angle computeAngle (PointID ind_p0, PointID ind_p1, PointID ind_p2) const
 
void init () override
 
void reinit () override
 
void draw (const core::visual::VisualParams *vparams) override
 
Coord getPointSetCenter () const
 
void getEnclosingSphere (Coord &center, Real &radius) const
 
void getAABB (Real bb[6]) const
 
void getAABB (CPos &minCoord, CPos &maxCoord) const
 Returns the axis aligned bounding box. More...
 
const CoordgetPointPosition (const PointID pointId) const
 
const CoordgetPointRestPosition (const PointID pointId) const
 
sofa::core::behavior::MechanicalState< DataTypes > * getDOF () const
 Returns the object where the mechanical DOFs are stored. More...
 
float getIndicesScale () const
 
void initPointsAdded (const helper::vector< sofa::defaulttype::index_type > &indices, const helper::vector< core::topology::PointAncestorElem > &ancestorElems, const helper::vector< core::VecCoordId > &coordVecs, const helper::vector< core::VecDerivId > &derivVecs) override
 Called by the MechanicalObject state change callback to initialize added points according to the topology (topology element & local coordinates) More...
 
virtual void initPointAdded (PointID indice, const core::topology::PointAncestorElem &ancestorElem, const helper::vector< VecCoord * > &coordVecs, const helper::vector< VecDeriv * > &derivVecs)
 Process the added point initialization according to the topology and local coordinates. More...
 

Static Public Member Functions

template<class T >
static bool canCreate (T *&obj, core::objectmodel::BaseContext *context, core::objectmodel::BaseObjectDescription *arg)
 

Protected Member Functions

 PointSetGeometryAlgorithms ()
 
 ~PointSetGeometryAlgorithms () override
 

Attribute details

template<class DataTypes >
Data<float> sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >::d_showIndicesScale
protected

Debug : scale for view topology indices.

template<class DataTypes >
Data<bool> sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >::d_showPointIndices
protected

Debug : view Point indices

template<class DataTypes >
Data<std::string> sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >::d_tagMechanics
protected

Tage of the Mechanical State associated with the vertex position.

Link to be set to the topology container in the component graph.

template<class DataTypes >
sofa::core::topology::BaseMeshTopology* sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >::m_topology
protected
template<class DataTypes >
sofa::core::behavior::MechanicalState<DataTypes>* sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >::object
protected

the object where the mechanical DOFs are stored

Constructor details

template<class DataTypes >
sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >::PointSetGeometryAlgorithms ( )
protected
template<class DataTypes >
sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >::~PointSetGeometryAlgorithms ( )
inlineoverrideprotected

Function details

template<class DataTypes >
template<class T >
static bool sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >::canCreate ( T *&  obj,
core::objectmodel::BaseContext context,
core::objectmodel::BaseObjectDescription arg 
)
inlinestatic
template<class DataTypes >
PointSetGeometryAlgorithms< DataTypes >::Angle sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >::computeAngle ( PointID  ind_p0,
PointID  ind_p1,
PointID  ind_p2 
) const
template<class DataTypes >
void sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >::draw ( const core::visual::VisualParams vparams)
override
template<class DataTypes >
void sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >::getAABB ( typename DataTypes::Real  bb[6]) const

return the axis aligned bounding box : index 0 = xmin, index 1=ymin, index 2 = zmin, index 3 = xmax, index 4 = ymax, index 5=zmax

template<class DataTypes >
void sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >::getAABB ( CPos minCoord,
CPos maxCoord 
) const

Returns the axis aligned bounding box.

template<class DataTypes >
sofa::core::behavior::MechanicalState<DataTypes>* sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >::getDOF ( ) const
inline

Returns the object where the mechanical DOFs are stored.

template<class DataTypes >
void sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >::getEnclosingSphere ( typename DataTypes::Coord &  center,
typename DataTypes::Real &  radius 
) const

return the centre and a radius of a sphere enclosing the set of points (may not be the smalled one)

template<class DataTypes >
float sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >::getIndicesScale ( ) const
template<class DataTypes >
const DataTypes::Coord & sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >::getPointPosition ( const PointID  pointId) const
template<class DataTypes >
const DataTypes::Coord & sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >::getPointRestPosition ( const PointID  pointId) const
template<class DataTypes >
DataTypes::Coord sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >::getPointSetCenter ( ) const

return the centroid of the set of points

template<class DataTypes >
void sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >::init ( void  )
override
template<class DataTypes >
void sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >::initPointsAdded ( const helper::vector< sofa::defaulttype::index_type > &  indices,
const helper::vector< core::topology::PointAncestorElem > &  ancestorElems,
const helper::vector< core::VecCoordId > &  coordVecs,
const helper::vector< core::VecDerivId > &  derivVecs 
)
override

Called by the MechanicalObject state change callback to initialize added points according to the topology (topology element & local coordinates)

template<class DataTypes >
void sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >::reinit ( )
override
template<class DataTypes >
sofa::component::topology::PointSetGeometryAlgorithms< DataTypes >::SOFA_CLASS ( SOFA_TEMPLATE(PointSetGeometryAlgorithms< DataTypes >, DataTypes)  ,
core::topology::GeometryAlgorithms   
)

Enum details

template<class DataTypes >
anonymous enum
Enumerator
NC 
Enumerator
ACUTE 
RIGHT 
OBTUSE