SOFA API  1a4bb3e7
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 Attributes

static constexpr sofa::Size spatial_dimensions = Coord::spatial_dimensions
 
static constexpr sofa::Size coord_total_size = Coord::total_size
 
static constexpr sofa::Size deriv_total_size = Deriv::total_size
 

Static Public Member Functions

static constexpr const CPosgetCPos (const Coord &c)
 
static constexpr void setCPos (Coord &c, const CPos &v)
 
static constexpr const CRotgetCRot (const Coord &c)
 
static constexpr void setCRot (Coord &c, const CRot &v)
 
static constexpr const DPosgetDPos (const Deriv &d)
 
static constexpr void setDPos (Deriv &d, const DPos &v)
 
static constexpr const DRotgetDRot (const Deriv &d)
 
static constexpr void setDRot (Deriv &d, const DRot &v)
 
static constexpr const charName ()
 
template<typename T >
static constexpr void set (Coord &c, T x, T y, T)
 
template<typename T >
static constexpr void get (T &x, T &y, T &z, const Coord &c)
 
template<typename T >
static constexpr void add (Coord &c, T x, T y, T)
 
template<typename T >
static constexpr void set (Deriv &c, T x, T y, T)
 
template<typename T >
static constexpr void get (T &x, T &y, T &z, const Deriv &c)
 
template<typename T >
static constexpr void set (Deriv &c, T x, T y, T, T vrot, T, T)
 
template<typename T >
static constexpr 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 type::vector< Coord > &ancestors, const type::vector< Real > &coefs)
 
static Deriv interpolate (const type::vector< Deriv > &ancestors, const type::vector< Real > &coefs)
 
static constexpr 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 constexpr 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 constexpr CRot rotationEuler (Real x, Real, Real)
 create a rotation from Euler angles (only the first is used). For homogeneity with 3D. More...
 

Attribute details

◆ coord_total_size

template<typename real >
constexpr sofa::Size sofa::defaulttype::StdRigidTypes< 2, real >::coord_total_size = Coord::total_size
staticconstexpr

◆ deriv_total_size

template<typename real >
constexpr sofa::Size sofa::defaulttype::StdRigidTypes< 2, real >::deriv_total_size = Deriv::total_size
staticconstexpr

◆ spatial_dimensions

template<typename real >
constexpr sofa::Size sofa::defaulttype::StdRigidTypes< 2, real >::spatial_dimensions = Coord::spatial_dimensions
staticconstexpr

Function details

◆ add() [1/2]

template<typename real >
template<typename T >
static constexpr void sofa::defaulttype::StdRigidTypes< 2, real >::add ( Coord c,
x,
y,
 
)
inlinestaticconstexpr

◆ add() [2/2]

template<typename real >
template<typename T >
static constexpr void sofa::defaulttype::StdRigidTypes< 2, real >::add ( Deriv c,
x,
y,
 
)
inlinestaticconstexpr

◆ crosscross() [1/2]

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

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

◆ crosscross() [2/2]

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

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.

◆ get() [1/2]

template<typename real >
template<typename T >
static constexpr void sofa::defaulttype::StdRigidTypes< 2, real >::get ( T &  x,
T &  y,
T &  z,
const Coord c 
)
inlinestaticconstexpr

◆ get() [2/2]

template<typename real >
template<typename T >
static constexpr void sofa::defaulttype::StdRigidTypes< 2, real >::get ( T &  x,
T &  y,
T &  z,
const Deriv c 
)
inlinestaticconstexpr

◆ getCPos()

template<typename real >
static constexpr const CPos& sofa::defaulttype::StdRigidTypes< 2, real >::getCPos ( const Coord c)
inlinestaticconstexpr

◆ getCRot()

template<typename real >
static constexpr const CRot& sofa::defaulttype::StdRigidTypes< 2, real >::getCRot ( const Coord c)
inlinestaticconstexpr

◆ getDPos()

template<typename real >
static constexpr const DPos& sofa::defaulttype::StdRigidTypes< 2, real >::getDPos ( const Deriv d)
inlinestaticconstexpr

◆ getDRot()

template<typename real >
static constexpr const DRot& sofa::defaulttype::StdRigidTypes< 2, real >::getDRot ( const Deriv d)
inlinestaticconstexpr

◆ interpolate() [1/2]

template<typename real >
static Coord sofa::defaulttype::StdRigidTypes< 2, real >::interpolate ( const type::vector< Coord > &  ancestors,
const type::vector< Real > &  coefs 
)
inlinestatic

◆ interpolate() [2/2]

template<typename real >
static Deriv sofa::defaulttype::StdRigidTypes< 2, real >::interpolate ( const type::vector< Deriv > &  ancestors,
const type::vector< Real > &  coefs 
)
inlinestatic

◆ Name()

template<typename real >
static constexpr const char* sofa::defaulttype::StdRigidTypes< 2, real >::Name ( )
staticconstexpr

◆ randomDeriv()

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.

◆ rotationEuler()

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

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

◆ set() [1/3]

template<typename real >
template<typename T >
static constexpr void sofa::defaulttype::StdRigidTypes< 2, real >::set ( Coord c,
x,
y,
 
)
inlinestaticconstexpr

◆ set() [2/3]

template<typename real >
template<typename T >
static constexpr void sofa::defaulttype::StdRigidTypes< 2, real >::set ( Deriv c,
x,
y,
 
)
inlinestaticconstexpr

◆ set() [3/3]

template<typename real >
template<typename T >
static constexpr void sofa::defaulttype::StdRigidTypes< 2, real >::set ( Deriv c,
x,
y,
,
vrot,
,
 
)
inlinestaticconstexpr

◆ setCPos()

template<typename real >
static constexpr void sofa::defaulttype::StdRigidTypes< 2, real >::setCPos ( Coord c,
const CPos v 
)
inlinestaticconstexpr

◆ setCRot()

template<typename real >
static constexpr void sofa::defaulttype::StdRigidTypes< 2, real >::setCRot ( Coord c,
const CRot v 
)
inlinestaticconstexpr

◆ setDPos()

template<typename real >
static constexpr void sofa::defaulttype::StdRigidTypes< 2, real >::setDPos ( Deriv d,
const DPos v 
)
inlinestaticconstexpr

◆ setDRot()

template<typename real >
static constexpr void sofa::defaulttype::StdRigidTypes< 2, real >::setDRot ( Deriv d,
const DRot v 
)
inlinestaticconstexpr