SOFA API  1a4bb3e7
Open source framework for multi-physics simuation
sofa::defaulttype::StdRigidTypes< 3, real > Class Template Reference

#include <RigidTypes.h>

Detailed Description

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

Degrees of freedom of 3D rigid bodies. Orientations are modeled using quaternions.

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)
 
template<typename T >
static constexpr void set (Coord &c, T x, T y, T z)
 
template<typename T >
static constexpr void get (T &x, T &y, T &z, const Coord &c)
 
template<typename T >
static constexpr void set (Deriv &c, T x, T y, T z, T rx, T ry, T rz)
 
template<typename T >
static constexpr void add (Coord &c, T x, T y, T z)
 
template<typename T >
static constexpr void set (Deriv &c, T x, T y, T z)
 
template<typename T >
static constexpr void get (T &x, T &y, T &z, const Deriv &c)
 
template<typename T >
static constexpr void add (Deriv &c, T x, T y, T z)
 
static constexpr const charName ()
 
static Deriv randomDeriv (Real minMagnitude, Real maxMagnitude)
 Return a Deriv with random value. Each entry with magnitude smaller than the given value. More...
 
static Deriv coordDifference (const Coord &c1, const Coord &c2)
 
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 Coord inverse (const Coord &c)
 inverse rigid transform More...
 
static constexpr Coord mult (const Coord &a, const Coord &b)
 matrix product More...
 
static constexpr Vec3 crosscross (const Vec3 &a, const Vec3 &b, const Vec3 &c)
 double cross product: a * ( b * c ) More...
 
static Quat rotationEuler (Real x, Real y, Real z)
 create a rotation from Euler angles. For homogeneity with 2D. More...
 

Attribute details

◆ coord_total_size

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

◆ deriv_total_size

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

◆ spatial_dimensions

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

Function details

◆ add() [1/2]

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

◆ add() [2/2]

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

◆ coordDifference()

template<typename real >
static Deriv sofa::defaulttype::StdRigidTypes< 3, real >::coordDifference ( const Coord c1,
const Coord c2 
)
inlinestatic

◆ crosscross()

template<typename real >
static constexpr Vec3 sofa::defaulttype::StdRigidTypes< 3, real >::crosscross ( const Vec3 a,
const Vec3 b,
const Vec3 c 
)
inlinestaticconstexpr

double cross product: a * ( b * c )

◆ get() [1/2]

template<typename real >
template<typename T >
static constexpr void sofa::defaulttype::StdRigidTypes< 3, 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< 3, real >::get ( T &  x,
T &  y,
T &  z,
const Deriv c 
)
inlinestaticconstexpr

◆ getCPos()

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

◆ getCRot()

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

◆ getDPos()

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

◆ getDRot()

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

◆ interpolate() [1/2]

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

◆ interpolate() [2/2]

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

◆ inverse()

template<typename real >
static constexpr Coord sofa::defaulttype::StdRigidTypes< 3, real >::inverse ( const Coord c)
inlinestaticconstexpr

inverse rigid transform

◆ mult()

template<typename real >
static constexpr Coord sofa::defaulttype::StdRigidTypes< 3, real >::mult ( const Coord a,
const Coord b 
)
inlinestaticconstexpr

matrix product

◆ Name()

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

◆ randomDeriv()

template<typename real >
static Deriv sofa::defaulttype::StdRigidTypes< 3, 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 Quat sofa::defaulttype::StdRigidTypes< 3, real >::rotationEuler ( Real  x,
Real  y,
Real  z 
)
inlinestatic

create a rotation from Euler angles. For homogeneity with 2D.

◆ set() [1/3]

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

◆ set() [2/3]

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

◆ set() [3/3]

template<typename real >
template<typename T >
static constexpr void sofa::defaulttype::StdRigidTypes< 3, real >::set ( Deriv c,
x,
y,
z,
rx,
ry,
rz 
)
inlinestaticconstexpr

◆ setCPos()

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

◆ setCRot()

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

◆ setDPos()

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

◆ setDRot()

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