sofa::core::componentmodel::behavior::State< TDataTypes > Class Template Reference

Component storing position and velocity vectors. More...

#include <State.h>

Inheritance diagram for sofa::core::componentmodel::behavior::State< TDataTypes >:

Inheritance graph
[legend]
Collaboration diagram for sofa::core::componentmodel::behavior::State< TDataTypes >:

Collaboration graph
[legend]

Public Types

typedef TDataTypes DataTypes
typedef DataTypes::Real Real
 Scalar values (float or double).
typedef DataTypes::Coord Coord
 Position values.
typedef DataTypes::Deriv Deriv
 Derivative values (velocity, forces, displacements).
typedef DataTypes::VecReal VecReal
 Container of scalar values with the same API as sofa::helper::vector.
typedef DataTypes::VecCoord VecCoord
 Container of Coord values with the same API as sofa::helper::vector.
typedef DataTypes::VecDeriv VecDeriv
 Container of Deriv values with the same API as sofa::helper::vector.
typedef DataTypes::SparseDeriv SparseDeriv
 Index + Deriv value (entry of a sparse vector).
typedef DataTypes::SparseVecDeriv SparseVecDeriv
 Sparse vector of Deriv values (defining coefficient of a constraint).
typedef DataTypes::VecConst VecConst
 Vector of constraints (i.e. of SparseVecDeriv).

Public Member Functions

virtual ~State ()
virtual VecCoord * getX ()=0
 Return the current position vector (read-write access).
virtual VecDeriv * getV ()=0
 Return the current velocity vector (read-write access).
virtual const VecCoord * getX () const =0
 Return the current position vector (read-only access).
virtual const VecDeriv * getV () const =0
 Return the current velocity vector (read-only access).
virtual std::string getTemplateName () const
 Get the template type names (if any) used to instantiate this object.

Static Public Member Functions

static std::string templateName (const State< DataTypes > *=NULL)
static std::string Name (const State< DataTypes > *=NULL)

Detailed Description

template<class TDataTypes>
class sofa::core::componentmodel::behavior::State< TDataTypes >

Component storing position and velocity vectors.

This class define the interface of components used as source and destination of regular (non mechanical) mapping. It is then specialized as MechanicalState (storing other mechanical data) or MappedModel (if no mechanical data is used, such as for VisualModel).

The given DataTypes class should define the following internal types:

Todo:
sofa::core::componentmodel::behavior::State is related to sofa::core::Mapping, and not to sofa::core::componentmodel::behavior::MechanicalMapping, so why is it in the same namespace ? Maybe we should put it in componentmodel namespace instead or directly in Core.

Definition at line 66 of file State.h.


Member Typedef Documentation

template<class TDataTypes >
typedef DataTypes::Coord sofa::core::componentmodel::behavior::State< TDataTypes >::Coord

template<class TDataTypes >
typedef TDataTypes sofa::core::componentmodel::behavior::State< TDataTypes >::DataTypes

template<class TDataTypes >
typedef DataTypes::Deriv sofa::core::componentmodel::behavior::State< TDataTypes >::Deriv

template<class TDataTypes >
typedef DataTypes::Real sofa::core::componentmodel::behavior::State< TDataTypes >::Real

Scalar values (float or double).

Reimplemented in sofa::core::componentmodel::behavior::MappedModel< TDataTypes >, sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >, sofa::component::collision::TSphereModel< TDataTypes >, sofa::component::MappedObject< DataTypes >, sofa::component::MechanicalObject< DataTypes >, sofa::component::visualmodel::VisualModelImpl, sofa::core::componentmodel::behavior::MappedModel< sofa::defaulttype::ExtVectorTypes< sofa::defaulttype::Vec< 3, GLfloat >, sofa::defaulttype::Vec< 3, GLfloat > > >, sofa::core::componentmodel::behavior::MappedModel< StdRigidTypes< 3, float > >, sofa::core::componentmodel::behavior::MappedModel< sofa::defaulttype::ExtVectorTypes >, sofa::core::componentmodel::behavior::MappedModel< DataTypes >, sofa::core::componentmodel::behavior::MechanicalState< sofa::gpu::cuda::CudaVectorTypes >, sofa::core::componentmodel::behavior::MechanicalState< sofa::defaulttype::StdVectorTypes >, sofa::core::componentmodel::behavior::MechanicalState< StdRigidTypes< 3, double > >, sofa::core::componentmodel::behavior::MechanicalState< DataTypes2 >, sofa::core::componentmodel::behavior::MechanicalState< Rigid3Types >, sofa::core::componentmodel::behavior::MechanicalState< DataTypes1 >, sofa::core::componentmodel::behavior::MechanicalState< DataTypes >, sofa::component::MechanicalObject< sofa::defaulttype::StdVectorTypes >, sofa::component::MechanicalObject< Rigid3Types >, and sofa::component::MechanicalObject< TDataTypes >.

Definition at line 71 of file State.h.

template<class TDataTypes >
typedef DataTypes::SparseDeriv sofa::core::componentmodel::behavior::State< TDataTypes >::SparseDeriv

template<class TDataTypes >
typedef DataTypes::SparseVecDeriv sofa::core::componentmodel::behavior::State< TDataTypes >::SparseVecDeriv

template<class TDataTypes >
typedef DataTypes::VecConst sofa::core::componentmodel::behavior::State< TDataTypes >::VecConst

template<class TDataTypes >
typedef DataTypes::VecCoord sofa::core::componentmodel::behavior::State< TDataTypes >::VecCoord

Container of Coord values with the same API as sofa::helper::vector.

Reimplemented in sofa::core::componentmodel::behavior::MappedModel< TDataTypes >, sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >, sofa::component::MappedObject< DataTypes >, sofa::component::MechanicalObject< DataTypes >, sofa::component::visualmodel::VisualModelImpl, SofaFlowVR::FlowVRRenderMesh, sofa::component::collision::SphereTreeModel, sofa::core::componentmodel::behavior::MappedModel< sofa::defaulttype::ExtVectorTypes< sofa::defaulttype::Vec< 3, GLfloat >, sofa::defaulttype::Vec< 3, GLfloat > > >, sofa::core::componentmodel::behavior::MappedModel< StdRigidTypes< 3, float > >, sofa::core::componentmodel::behavior::MappedModel< sofa::defaulttype::ExtVectorTypes >, sofa::core::componentmodel::behavior::MappedModel< DataTypes >, sofa::core::componentmodel::behavior::MechanicalState< sofa::gpu::cuda::CudaVectorTypes >, sofa::core::componentmodel::behavior::MechanicalState< sofa::defaulttype::StdVectorTypes >, sofa::core::componentmodel::behavior::MechanicalState< StdRigidTypes< 3, double > >, sofa::core::componentmodel::behavior::MechanicalState< DataTypes2 >, sofa::core::componentmodel::behavior::MechanicalState< Rigid3Types >, sofa::core::componentmodel::behavior::MechanicalState< DataTypes1 >, sofa::core::componentmodel::behavior::MechanicalState< DataTypes >, sofa::component::MechanicalObject< sofa::defaulttype::StdVectorTypes >, sofa::component::MechanicalObject< Rigid3Types >, and sofa::component::MechanicalObject< TDataTypes >.

Definition at line 79 of file State.h.

template<class TDataTypes >
typedef DataTypes::VecDeriv sofa::core::componentmodel::behavior::State< TDataTypes >::VecDeriv

Container of Deriv values with the same API as sofa::helper::vector.

Reimplemented in sofa::core::componentmodel::behavior::MappedModel< TDataTypes >, sofa::core::componentmodel::behavior::MechanicalState< TDataTypes >, sofa::component::MappedObject< DataTypes >, sofa::component::MechanicalObject< DataTypes >, sofa::component::visualmodel::VisualModelImpl, sofa::core::componentmodel::behavior::MappedModel< sofa::defaulttype::ExtVectorTypes< sofa::defaulttype::Vec< 3, GLfloat >, sofa::defaulttype::Vec< 3, GLfloat > > >, sofa::core::componentmodel::behavior::MappedModel< StdRigidTypes< 3, float > >, sofa::core::componentmodel::behavior::MappedModel< sofa::defaulttype::ExtVectorTypes >, sofa::core::componentmodel::behavior::MappedModel< DataTypes >, sofa::core::componentmodel::behavior::MechanicalState< sofa::gpu::cuda::CudaVectorTypes >, sofa::core::componentmodel::behavior::MechanicalState< sofa::defaulttype::StdVectorTypes >, sofa::core::componentmodel::behavior::MechanicalState< StdRigidTypes< 3, double > >, sofa::core::componentmodel::behavior::MechanicalState< DataTypes2 >, sofa::core::componentmodel::behavior::MechanicalState< Rigid3Types >, sofa::core::componentmodel::behavior::MechanicalState< DataTypes1 >, sofa::core::componentmodel::behavior::MechanicalState< DataTypes >, sofa::component::MechanicalObject< sofa::defaulttype::StdVectorTypes >, sofa::component::MechanicalObject< Rigid3Types >, and sofa::component::MechanicalObject< TDataTypes >.

Definition at line 81 of file State.h.

template<class TDataTypes >
typedef DataTypes::VecReal sofa::core::componentmodel::behavior::State< TDataTypes >::VecReal


Constructor & Destructor Documentation

template<class TDataTypes >
virtual sofa::core::componentmodel::behavior::State< TDataTypes >::~State (  )  [inline, virtual]

Definition at line 89 of file State.h.


Member Function Documentation

template<class TDataTypes >
virtual std::string sofa::core::componentmodel::behavior::State< TDataTypes >::getTemplateName (  )  const [inline, virtual]

template<class TDataTypes >
virtual const VecDeriv* sofa::core::componentmodel::behavior::State< TDataTypes >::getV (  )  const [pure virtual]

template<class TDataTypes >
virtual VecDeriv* sofa::core::componentmodel::behavior::State< TDataTypes >::getV (  )  [pure virtual]

template<class TDataTypes >
virtual const VecCoord* sofa::core::componentmodel::behavior::State< TDataTypes >::getX (  )  const [pure virtual]

template<class TDataTypes >
virtual VecCoord* sofa::core::componentmodel::behavior::State< TDataTypes >::getX (  )  [pure virtual]

template<class TDataTypes >
static std::string sofa::core::componentmodel::behavior::State< TDataTypes >::Name ( const State< DataTypes > *  = NULL  )  [inline, static]

template<class TDataTypes >
static std::string sofa::core::componentmodel::behavior::State< TDataTypes >::templateName ( const State< DataTypes > *  = NULL  )  [inline, static]


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

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