SOFA API  6a688117
Open source framework for multi-physics simuation
sofa::defaulttype::StdRigidTypes< 2, real > Class Template Reference

#include <RigidTypes.h>

Detailed Description

template<typename real>
class sofa::defaulttype::StdRigidTypes< 2, real >

Degrees of freedom of 2D rigid bodies.

Static Public Member Functions

static const CPosgetCPos (const Coord &c)
 
static void setCPos (Coord &c, const CPos &v)
 
static const CRotgetCRot (const Coord &c)
 
static void setCRot (Coord &c, const CRot &v)
 
static const DPosgetDPos (const Deriv &d)
 
static void setDPos (Deriv &d, const DPos &v)
 
static const DRotgetDRot (const Deriv &d)
 
static void setDRot (Deriv &d, const DRot &v)
 
static const char * Name ()
 
template<typename T >
static void set (Coord &c, T x, T y, T)
 
template<typename T >
static void get (T &x, T &y, T &z, const Coord &c)
 
template<typename T >
static void add (Coord &c, T x, T y, T)
 
template<typename T >
static void set (Deriv &c, T x, T y, T)
 
template<typename T >
static void get (T &x, T &y, T &z, const Deriv &c)
 
template<typename T >
static void set (Deriv &c, T x, T y, T, T vrot, T, T)
 
template<typename T >
static void add (Deriv &c, T x, T y, T)
 
static Deriv randomDeriv (Real minMagnitude, Real maxMagnitude)
 Return a Deriv with random value. Each entry with magnitude smaller than the given value. More...
 
static Coord interpolate (const helper::vector< Coord > &ancestors, const helper::vector< Real > &coefs)
 
static Deriv interpolate (const helper::vector< Deriv > &ancestors, const helper::vector< Real > &coefs)
 
static Real crosscross (const Vec2 &f, const Real &dtheta, const Vec2 &OP)
 specialized version of the double cross product: a * ( b * c ) for the variation of torque applied to the frame due to a small rotation with constant force. More...
 
static Vec2 crosscross (const Real &omega, const Real &dtheta, const Vec2 &OP)
 specialized version of the double cross product: a * ( b * c ) for point acceleration More...
 
static CRot rotationEuler (Real x, Real, Real)
 create a rotation from Euler angles (only the first is used). For homogeneity with 3D. More...
 

Function details

template<typename real >
template<typename T >
static void sofa::defaulttype::StdRigidTypes< 2, real >::add ( Coord c,
x,
y,
 
)
inlinestatic
template<typename real >
template<typename T >
static void sofa::defaulttype::StdRigidTypes< 2, real >::add ( Deriv c,
x,
y,
 
)
inlinestatic
template<typename real >
static Real sofa::defaulttype::StdRigidTypes< 2, real >::crosscross ( const Vec2 f,
const Real dtheta,
const Vec2 OP 
)
inlinestatic

specialized version of the double cross product: a * ( b * c ) for the variation of torque applied to the frame due to a small rotation with constant force.

template<typename real >
static Vec2 sofa::defaulttype::StdRigidTypes< 2, real >::crosscross ( const Real omega,
const Real dtheta,
const Vec2 OP 
)
inlinestatic

specialized version of the double cross product: a * ( b * c ) for point acceleration

template<typename real >
template<typename T >
static void sofa::defaulttype::StdRigidTypes< 2, real >::get ( T &  x,
T &  y,
T &  z,
const Coord c 
)
inlinestatic
template<typename real >
template<typename T >
static void sofa::defaulttype::StdRigidTypes< 2, real >::get ( T &  x,
T &  y,
T &  z,
const Deriv c 
)
inlinestatic
template<typename real >
static const CPos& sofa::defaulttype::StdRigidTypes< 2, real >::getCPos ( const Coord c)
inlinestatic
template<typename real >
static const CRot& sofa::defaulttype::StdRigidTypes< 2, real >::getCRot ( const Coord c)
inlinestatic
template<typename real >
static const DPos& sofa::defaulttype::StdRigidTypes< 2, real >::getDPos ( const Deriv d)
inlinestatic
template<typename real >
static const DRot& sofa::defaulttype::StdRigidTypes< 2, real >::getDRot ( const Deriv d)
inlinestatic
template<typename real >
static Coord sofa::defaulttype::StdRigidTypes< 2, real >::interpolate ( const helper::vector< Coord > &  ancestors,
const helper::vector< Real > &  coefs 
)
inlinestatic
template<typename real >
static Deriv sofa::defaulttype::StdRigidTypes< 2, real >::interpolate ( const helper::vector< Deriv > &  ancestors,
const helper::vector< Real > &  coefs 
)
inlinestatic
template<typename real >
static const char* sofa::defaulttype::StdRigidTypes< 2, real >::Name ( )
static
template<typename real >
static Deriv sofa::defaulttype::StdRigidTypes< 2, real >::randomDeriv ( Real  minMagnitude,
Real  maxMagnitude 
)
inlinestatic

Return a Deriv with random value. Each entry with magnitude smaller than the given value.

template<typename real >
static CRot sofa::defaulttype::StdRigidTypes< 2, real >::rotationEuler ( Real  x,
Real  ,
Real   
)
inlinestatic

create a rotation from Euler angles (only the first is used). For homogeneity with 3D.

template<typename real >
template<typename T >
static void sofa::defaulttype::StdRigidTypes< 2, real >::set ( Coord c,
x,
y,
 
)
inlinestatic
template<typename real >
template<typename T >
static void sofa::defaulttype::StdRigidTypes< 2, real >::set ( Deriv c,
x,
y,
 
)
inlinestatic
template<typename real >
template<typename T >
static void sofa::defaulttype::StdRigidTypes< 2, real >::set ( Deriv c,
x,
y,
,
vrot,
,
 
)
inlinestatic
template<typename real >
static void sofa::defaulttype::StdRigidTypes< 2, real >::setCPos ( Coord c,
const CPos v 
)
inlinestatic
template<typename real >
static void sofa::defaulttype::StdRigidTypes< 2, real >::setCRot ( Coord c,
const CRot v 
)
inlinestatic
template<typename real >
static void sofa::defaulttype::StdRigidTypes< 2, real >::setDPos ( Deriv d,
const DPos v 
)
inlinestatic
template<typename real >
static void sofa::defaulttype::StdRigidTypes< 2, real >::setDRot ( Deriv d,
const DRot v 
)
inlinestatic

Enum details

template<typename real >
anonymous enum
Enumerator
spatial_dimensions 
template<typename real >
anonymous enum
Enumerator
coord_total_size 
template<typename real >
anonymous enum
Enumerator
deriv_total_size