SOFA API  caf3b296
Open source framework for multi-physics simuation
sofa::defaulttype Namespace Reference

Classes

class  AbstractTypeInfo
 
class  BaseMatrix
 
class  BaseMatrixLinearOpAddM
 
class  BaseMatrixLinearOpAddMT
 
class  BaseMatrixLinearOpAM
 
struct  BaseMatrixLinearOpAM1_BlockSparse
 
struct  BaseMatrixLinearOpAM_BlockSparse
 
struct  BaseMatrixLinearOpAMS_BlockSparse
 
class  BaseMatrixLinearOpMulTV
 
class  BaseMatrixLinearOpMulV
 
class  BaseMatrixLinearOpMV
 
struct  BaseMatrixLinearOpMV_BlockDiagonal
 
struct  BaseMatrixLinearOpMV_BlockDiagonal< Real, 1, 1, add, transpose, M, V1, V2 >
 
struct  BaseMatrixLinearOpMV_BlockSparse
 
class  BaseMatrixLinearOpPMulTV
 
class  BaseMatrixLinearOpPMulV
 
class  BaseVector
 
struct  BoolTypeInfo
 
class  BoundingBox
 
class  BoundingBox1D
 bounding interval More...
 
class  BoundingBox2D
 bounding rectangle More...
 
struct  BoundingBoxTypeInfo
 
struct  CleanupCheck
 
struct  DataTypeInfo
 
struct  DataTypeInfo< bool >
 
struct  DataTypeInfo< BoundingBox >
 
struct  DataTypeInfo< char >
 
struct  DataTypeInfo< component::linearsolver::EigenBaseSparseMatrix< Real > >
 
struct  DataTypeInfo< component::linearsolver::EigenSparseMatrix< TIn, TOut > >
 
struct  DataTypeInfo< double >
 
struct  DataTypeInfo< float >
 
struct  DataTypeInfo< int >
 
struct  DataTypeInfo< long >
 
struct  DataTypeInfo< long long >
 
struct  DataTypeInfo< short >
 
struct  DataTypeInfo< sofa::core::objectmodel::Tag >
 
struct  DataTypeInfo< sofa::core::objectmodel::TagSet >
 
struct  DataTypeInfo< sofa::core::topology::Topology::Edge >
 
struct  DataTypeInfo< sofa::core::topology::Topology::Hexahedron >
 
struct  DataTypeInfo< sofa::core::topology::Topology::Pentahedron >
 
struct  DataTypeInfo< sofa::core::topology::Topology::Pyramid >
 
struct  DataTypeInfo< sofa::core::topology::Topology::Quad >
 
struct  DataTypeInfo< sofa::core::topology::Topology::Tetrahedron >
 
struct  DataTypeInfo< sofa::core::topology::Topology::Triangle >
 
struct  DataTypeInfo< sofa::defaulttype::Mat< L, C, real > >
 
struct  DataTypeInfo< sofa::defaulttype::RigidCoord< N, real > >
 
struct  DataTypeInfo< sofa::defaulttype::RigidDeriv< N, real > >
 
struct  DataTypeInfo< sofa::helper::fixed_array< T, N > >
 
struct  DataTypeInfo< sofa::helper::Quater< T > >
 
struct  DataTypeInfo< sofa::helper::types::RGBAColor >
 
struct  DataTypeInfo< sofa::helper::vector< bool, Alloc > >
 
struct  DataTypeInfo< sofa::helper::vector< std::string, Alloc > >
 
struct  DataTypeInfo< sofa::helper::vector< T, Alloc > >
 
struct  DataTypeInfo< std::set< T, Compare, Alloc > >
 
struct  DataTypeInfo< std::string >
 
struct  DataTypeInfo< std::vector< T, Alloc > >
 
struct  DataTypeInfo< unsigned char >
 
struct  DataTypeInfo< unsigned int >
 
struct  DataTypeInfo< unsigned long >
 
struct  DataTypeInfo< unsigned long long >
 
struct  DataTypeInfo< unsigned short >
 
struct  DataTypeName
 Type name template: default to using DataTypeInfo::name(), but can be overriden for types with shorter typedefs. More...
 
struct  DataTypeName< BoundingBox >
 
struct  DefaultDataTypeInfo
 
struct  EigenSparseToMapMapSparseMatrix
 
class  EigenSparseToMapMapSparseMatrix< sofa::defaulttype::RigidDeriv< N, Real > >
 
class  EigenSparseToMapMapSparseMatrix< sofa::defaulttype::Vec< N, Real > >
 
struct  EigenSparseToMapMapSparseMatrixVec
 
struct  FixedArrayTypeInfo
 
class  Frame
 
struct  IntegerTypeInfo
 
class  MapMapSparseMatrix
 
struct  MapMapSparseMatrixToEigenSparse
 
class  MapMapSparseMatrixToEigenSparse< sofa::defaulttype::RigidDeriv< N, Real > >
 
class  MapMapSparseMatrixToEigenSparse< sofa::defaulttype::Vec< N, Real > >
 
struct  MapMapSparseMatrixToEigenSparseVec
 
class  Mat
 
class  MatNoInit
 Same as Mat except the values are not initialized by default. More...
 
class  MatSym
 
class  Ray
 
class  RegisterTemplateAlias
 Helper class used to register a template alias in the TemplateAliases class. More...
 
class  RigidCoord
 
class  RigidCoord< 2, real >
 
class  RigidCoord< 3, real >
 
class  RigidDeriv
 
class  RigidDeriv< 2, real >
 
class  RigidDeriv< 3, real >
 
class  RigidMass
 
class  RigidMass< 2, real >
 
class  RigidMass< 3, real >
 
struct  ScalarTypeInfo
 
struct  SetTypeInfo
 
class  SolidTypes
 
class  StdRigidTypes
 
class  StdRigidTypes< 2, real >
 
class  StdRigidTypes< 3, real >
 
class  StdVectorTypes
 
class  TBoundingBox
 
class  TemplateAliases
 Class used to store and resolve template aliases. More...
 
struct  TextTypeInfo
 
struct  VectorTypeInfo
 
class  VirtualTypeInfo
 Abstract type traits class. More...
 

Typedefs

typedef Mat< 1, 1, floatMat1x1f
 
typedef Mat< 1, 1, doubleMat1x1d
 
typedef Mat< 2, 2, floatMat2x2f
 
typedef Mat< 2, 2, doubleMat2x2d
 
typedef Mat< 3, 3, floatMat3x3f
 
typedef Mat< 3, 3, doubleMat3x3d
 
typedef Mat< 3, 4, floatMat3x4f
 
typedef Mat< 3, 4, doubleMat3x4d
 
typedef Mat< 4, 4, floatMat4x4f
 
typedef Mat< 4, 4, doubleMat4x4d
 
typedef Mat< 2, 2, SReal > Mat2x2
 
typedef Mat< 3, 3, SReal > Mat3x3
 
typedef Mat< 4, 4, SReal > Mat4x4
 
typedef Mat< 2, 2, SReal > Matrix2
 
typedef Mat< 3, 3, SReal > Matrix3
 
typedef Mat< 4, 4, SReal > Matrix4
 
typedef helper::Quater< doubleQuatd
 alias More...
 
typedef helper::Quater< floatQuatf
 alias More...
 
typedef helper::Quater< SReal > Quat
 alias More...
 
typedef Quat Quaternion
 alias More...
 
typedef StdRigidTypes< 3, doubleRigid3dTypes
 
typedef RigidMass< 3, doubleRigid3dMass
 
typedef StdRigidTypes< 3, floatRigid3fTypes
 
typedef RigidMass< 3, floatRigid3fMass
 
typedef StdRigidTypes< 3, SReal > Rigid3Types
 un-defined precision type More...
 
typedef StdRigidTypes< 3, SReal > RigidTypes
 alias (beurk) More...
 
typedef RigidMass< 3, SReal > Rigid3Mass
 un-defined precision type More...
 
typedef StdRigidTypes< 2, doubleRigid2dTypes
 
typedef RigidMass< 2, doubleRigid2dMass
 
typedef StdRigidTypes< 2, floatRigid2fTypes
 
typedef RigidMass< 2, floatRigid2fMass
 
typedef StdRigidTypes< 2, SReal > Rigid2Types
 
typedef RigidMass< 2, SReal > Rigid2Mass
 
typedef std::map< std::string, TemplateAliasTemplateAliasesMap
 
typedef TemplateAliasesMap::const_iterator TemplateAliasesMapIterator
 
typedef std::pair< std::string, boolTemplateAlias
 
typedef unsigned int index_type
 
typedef StdVectorTypes< Vec3d, Vec3d, doubleVec3dTypes
 3D DOFs, double precision More...
 
typedef StdVectorTypes< Vec2d, Vec2d, doubleVec2dTypes
 2D DOFs, double precision More...
 
typedef StdVectorTypes< Vec1d, Vec1d, doubleVec1dTypes
 1D DOFs, double precision More...
 
typedef StdVectorTypes< Vec6d, Vec6d, doubleVec6dTypes
 6D DOFs, double precision More...
 
typedef StdVectorTypes< Vec3f, Vec3f, floatVec3fTypes
 3f DOFs, single precision More...
 
typedef StdVectorTypes< Vec2f, Vec2f, floatVec2fTypes
 2f DOFs, single precision More...
 
typedef StdVectorTypes< Vec1f, Vec1f, floatVec1fTypes
 1f DOFs, single precision More...
 
typedef StdVectorTypes< Vec6f, Vec6f, floatVec6fTypes
 6f DOFs, single precision More...
 
typedef StdVectorTypes< Vec6, Vec6, Vec6::value_type > Vec6Types
 6D DOFs, double precision (default) More...
 
typedef StdVectorTypes< Vec3, Vec3, Vec3::value_type > Vec3Types
 3D DOFs, double precision (default) More...
 
typedef StdVectorTypes< Vec2, Vec2, Vec2::value_type > Vec2Types
 2D DOFs, double precision (default) More...
 
typedef StdVectorTypes< Vec1, Vec1, Vec1::value_type > Vec1Types
 1D DOFs, double precision (default) More...
 

Functions

int hexval (char c)
 
bool isValidEncoding (const std::string &s)
 
SOFA_DEFAULTTYPE_API std::istream & operator>> (std::istream &i, RGBAColor &t)
 
std::ostream & operator<< (std::ostream &out, const sofa::defaulttype::Frame &c)
 
SOFA_DEFAULTTYPE_API void init ()
 Initialize the SofaDefaultType library, as well as it dependency: SofaHelper. More...
 
SOFA_DEFAULTTYPE_API bool isInitialized ()
 Return true if and only if the SofaDefaultType library has been initialized. More...
 
SOFA_DEFAULTTYPE_API void cleanup ()
 Clean up the resources used by the SofaDefaultType library, as well as its dependency: SofaHelper. More...
 
SOFA_DEFAULTTYPE_API bool isCleanedUp ()
 Return true if and only if the SofaDefaultType library has been cleaned up. More...
 
template<class MatrixRow , class VecDeriv >
VecDeriv::Real SparseMatrixVecDerivMult (const MatrixRow &row, const VecDeriv &vec)
 
template<typename LhsDeriv , typename RhsDeriv , typename Real >
void addMultTransposeEigen (MapMapSparseMatrix< LhsDeriv > &lhs, const Eigen::SparseMatrix< Real, Eigen::RowMajor > &jacobian, const MapMapSparseMatrix< RhsDeriv > &rhs)
 Computes lhs += jacobian^T * rhs. More...
 
template<class real >
real determinant (const Mat< 3, 3, real > &m)
 Determinant of a 3x3 matrix. More...
 
template<class real >
real determinant (const Mat< 2, 2, real > &m)
 Determinant of a 2x2 matrix. More...
 
template<class real >
real determinant (const Mat< 2, 3, real > &m)
 
template<class real >
real determinant (const Mat< 3, 2, real > &m)
 
template<class real >
real oneNorm (const Mat< 3, 3, real > &A)
 
template<class real >
real infNorm (const Mat< 3, 3, real > &A)
 
template<int N, class real >
real trace (const Mat< N, N, real > &m)
 trace of a square matrix More...
 
template<int N, class real >
Vec< N, real > diagonal (const Mat< N, N, real > &m)
 diagonal of a square matrix More...
 
template<int S, class real >
bool invertMatrix (Mat< S, S, real > &dest, const Mat< S, S, real > &from)
 Matrix inversion (general case). More...
 
template<class real >
bool invertMatrix (Mat< 3, 3, real > &dest, const Mat< 3, 3, real > &from)
 Matrix inversion (special case 3x3). More...
 
template<class real >
bool invertMatrix (Mat< 2, 2, real > &dest, const Mat< 2, 2, real > &from)
 Matrix inversion (special case 2x2). More...
 
template<int S, class real >
bool transformInvertMatrix (Mat< S, S, real > &dest, const Mat< S, S, real > &from)
 Inverse Matrix considering the matrix as a transformation. More...
 
template<int L, int C, typename real >
std::ostream & operator<< (std::ostream &o, const Mat< L, C, real > &m)
 
template<int L, int C, typename real >
std::istream & operator>> (std::istream &in, sofa::defaulttype::Mat< L, C, real > &m)
 
template<int L, int C, typename real >
void printMatlab (std::ostream &o, const Mat< L, C, real > &m)
 printing in other software formats More...
 
template<int L, int C, typename real >
void printMaple (std::ostream &o, const Mat< L, C, real > &m)
 
template<int L, int C, typename T >
Mat< L, C, T > dyad (const Vec< L, T > &u, const Vec< C, T > &v)
 Create a matrix as $ u v^T $. More...
 
template<int L, int C, typename real >
real scalarProduct (const Mat< L, C, real > &left, const Mat< L, C, real > &right)
 Compute the scalar product of two matrix (sum of product of all terms) More...
 
template<class Real >
defaulttype::Mat< 3, 3, RealcrossProductMatrix (const defaulttype::Vec< 3, Real > &v)
 
template<int n, class real >
bool cholDcmp (Mat< n, n, real > &L, const Mat< n, n, real > &M)
 
template<int n, class real >
void cholBksb (Vec< n, real > &x, const Mat< n, n, real > &L, const Vec< n, real > &b)
 
template<int n, class real >
bool cholSlv (Vec< n, real > &x, const Mat< n, n, real > &M, const Vec< n, real > &b)
 
template<int n, class real >
bool cholInv (Mat< n, n, real > &Inv, const Mat< n, n, real > &M)
 
template<int n, typename Real >
void ludcmp (Mat< n, n, Real > &a, Vec< n, int > &indx)
 Compute the LU decomposition of matrix a. a is replaced by its pivoted LU decomposition. indx stores pivoting indices. More...
 
template<int n, typename Real >
void lubksb (const Mat< n, n, Real > &a, const Vec< n, int > &indx, Vec< n, Real > &b)
 Compute the solution of Mx=b. b is replaced by x. a and indx together represent the LU decomposition of m, as given my method ludcmp. More...
 
template<int n, typename Real >
void luinv (Mat< n, n, Real > &inv, Mat< n, n, Real > &m)
 
template<class T1 , class T2 >
const T1 S_MAX (const T1 &a, const T2 &b)
 return the max of two values More...
 
template<class T1 , class T2 >
const T1 S_MIN (const T1 &a, const T2 &b)
 return the min of two values More...
 
template<class T1 , class T2 >
const T1 S_SIGN (const T1 &a, const T2 &b)
 
template<class T >
const T S_SQR (const T a)
 
template<class T1 , class T2 >
T1 pythag (const T1 a, const T2 b)
 Computes sqrt(a^2 + b^2) without destructive underflow or overflow. More...
 
template<int m, int n, typename Real >
void svddcmp (Mat< m, n, Real > &a, Vec< n, Real > &w, Mat< n, m, Real > &v)
 Compute the SVD decomposition of matrix a (from nr). a is replaced by its pivoted LU decomposition. indx stores pivoting indices. More...
 
template<int m, int n, typename Real >
Real cond (Mat< m, n, Real > &a)
 return the condition number of the matrix a following the euclidian norm (using the svd decomposition to find singular values) More...
 
template<class real >
real determinant (const MatSym< 3, real > &m)
 Determinant of a 3x3 matrix. More...
 
template<class real >
real determinant (const MatSym< 2, real > &m)
 Determinant of a 2x2 matrix. More...
 
template<class real >
real trace (const MatSym< 3, real > &m)
 Trace of a 3x3 matrix. More...
 
template<class real >
real trace (const MatSym< 2, real > &m)
 Trace of a 2x2 matrix. More...
 
template<int S, class real >
bool invertMatrix (MatSym< S, real > &dest, const MatSym< S, real > &from)
 Matrix inversion (general case). More...
 
template<class real >
bool invertMatrix (MatSym< 3, real > &dest, const MatSym< 3, real > &from)
 Matrix inversion (special case 3x3). More...
 
template<class real >
bool invertMatrix (MatSym< 2, real > &dest, const MatSym< 2, real > &from)
 Matrix inversion (special case 2x2). More...
 
template<int D, class real >
std::ostream & operator<< (std::ostream &o, const MatSym< D, real > &m)
 
template<int D, class real >
std::istream & operator>> (std::istream &in, MatSym< D, real > &m)
 
template<int D, typename real >
real scalarProduct (const MatSym< D, real > &left, const MatSym< D, real > &right)
 Compute the scalar product of two matrix (sum of product of all terms) More...
 
template<int D, typename real >
real scalarProduct (const MatSym< D, real > &left, const Mat< D, D, real > &right)
 
template<int D, typename real >
real scalarProduct (const Mat< D, D, real > &left, const MatSym< D, real > &right)
 
template<typename real , typename real2 >
RigidDeriv< 3, real > operator* (RigidDeriv< 3, real > r, real2 a)
 
template<typename real , typename real2 >
RigidDeriv< 3, real > operator/ (RigidDeriv< 3, real > r, real2 a)
 
template<int N, typename T >
RigidDeriv< N, T >::Pos & getLinear (RigidDeriv< N, T > &v)
 
template<int N, typename T >
const RigidDeriv< N, T >::Pos & getLinear (const RigidDeriv< N, T > &v)
 
template<int N, typename T >
RigidDeriv< N, T >::Rot & getAngular (RigidDeriv< N, T > &v)
 
template<int N, typename T >
const RigidDeriv< N, T >::Rot & getAngular (const RigidDeriv< N, T > &v)
 
template<int N, typename T >
RigidDeriv< N, T >::Pos & getVCenter (RigidDeriv< N, T > &v)
 
template<int N, typename T >
const RigidDeriv< N, T >::Pos & getVCenter (const RigidDeriv< N, T > &v)
 
template<int N, typename T >
RigidDeriv< N, T >::Rot & getVOrientation (RigidDeriv< N, T > &v)
 
template<int N, typename T >
const RigidDeriv< N, T >::Rot & getVOrientation (const RigidDeriv< N, T > &v)
 
template<typename T , typename R >
Vec< 3, T > velocityAtRotatedPoint (const RigidDeriv< 3, R > &v, const Vec< 3, T > &p)
 Velocity at point p, where p is the offset from the origin of the frame, given in the same coordinate system as the velocity of the origin. More...
 
template<typename real >
RigidDeriv< 3, real > operator* (const RigidDeriv< 3, real > &d, const RigidMass< 3, real > &m)
 
template<typename real >
RigidDeriv< 3, real > operator* (const RigidMass< 3, real > &m, const RigidDeriv< 3, real > &d)
 
template<typename real >
RigidDeriv< 3, real > operator/ (const RigidDeriv< 3, real > &d, const RigidMass< 3, real > &m)
 
template<typename real , typename real2 >
RigidDeriv< 2, real > operator* (RigidDeriv< 2, real > r, real2 a)
 
template<typename real , typename real2 >
RigidDeriv< 2, real > operator/ (RigidDeriv< 2, real > r, real2 a)
 
template<typename R , typename T >
Vec< 2, R > velocityAtRotatedPoint (const RigidDeriv< 2, T > &v, const Vec< 2, R > &p)
 Velocity at point p, where p is the offset from the origin of the frame, given in the same coordinate system as the velocity of the origin. More...
 
template<typename real >
RigidDeriv< 2, real > operator* (const RigidDeriv< 2, real > &d, const RigidMass< 2, real > &m)
 
template<typename real >
RigidDeriv< 2, real > operator/ (const RigidDeriv< 2, real > &d, const RigidMass< 2, real > &m)
 
template<typename T >
const Vec< 3, T > getVCenter (const Vec< 6, T > &v)
 
template<typename T >
const Vec< 3, T > getVOrientation (const Vec< 6, T > &v)
 
TemplateAliasesMapgetTemplateAliasesMap ()
 
template<class T >
constexpr bool isDouble ()
 
template<>
constexpr bool isDouble< double > ()
 
constexpr bool isSRealDouble ()
 
constexpr bool isSRealFloat ()
 
Helpers

Helper Functions to more easily create tests and check the results.

Variables

template class SOFA_DEFAULTTYPE_API SolidTypes< double >
 
class SOFA_DEFAULTTYPE_API Transform
 
constexpr index_type InvalidID = UINT_MAX
 

Typedef Documentation

typedef Mat<2,2,SReal> sofa::defaulttype::Mat2x2
typedef Mat<3,3,SReal> sofa::defaulttype::Mat3x3
typedef Mat<4,4,SReal> sofa::defaulttype::Mat4x4
typedef Mat<2,2,SReal> sofa::defaulttype::Matrix2
typedef Mat<3,3,SReal> sofa::defaulttype::Matrix3
typedef Mat<4,4,SReal> sofa::defaulttype::Matrix4

un-defined precision type

un-defined precision type

alias (beurk)

typedef std::pair<std::string, bool> sofa::defaulttype::TemplateAlias
typedef std::map<std::string, TemplateAlias> sofa::defaulttype::TemplateAliasesMap
typedef TemplateAliasesMap::const_iterator sofa::defaulttype::TemplateAliasesMapIterator

1D DOFs, double precision

1f DOFs, single precision

typedef StdVectorTypes<Vec1,Vec1,Vec1::value_type> sofa::defaulttype::Vec1Types

1D DOFs, double precision (default)

2D DOFs, double precision

2f DOFs, single precision

typedef StdVectorTypes<Vec2,Vec2,Vec2::value_type> sofa::defaulttype::Vec2Types

2D DOFs, double precision (default)

3D DOFs, double precision

3f DOFs, single precision

typedef StdVectorTypes<Vec3,Vec3,Vec3::value_type> sofa::defaulttype::Vec3Types

3D DOFs, double precision (default)

6D DOFs, double precision

6f DOFs, single precision

typedef StdVectorTypes<Vec6,Vec6,Vec6::value_type> sofa::defaulttype::Vec6Types

6D DOFs, double precision (default)

Function Documentation

template<typename LhsDeriv , typename RhsDeriv , typename Real >
void sofa::defaulttype::addMultTransposeEigen ( MapMapSparseMatrix< LhsDeriv > &  lhs,
const Eigen::SparseMatrix< Real, Eigen::RowMajor > &  jacobian,
const MapMapSparseMatrix< RhsDeriv > &  rhs 
)

Computes lhs += jacobian^T * rhs.

template<int n, class real >
void sofa::defaulttype::cholBksb ( Vec< n, real > &  x,
const Mat< n, n, real > &  L,
const Vec< n, real > &  b 
)

Cholesky back-substitution: solve the system Mx=b using the triangular matrix L such that M=L.Lt

Precondition
L was computed using the Cholesky decomposition of L
template<int n, class real >
bool sofa::defaulttype::cholDcmp ( Mat< n, n, real > &  L,
const Mat< n, n, real > &  M 
)

Cholesky decomposition: compute triangular matrix L such that M=L.Lt

Precondition
M must be symmetric positive definite returns false is the decomposition fails
template<int n, class real >
bool sofa::defaulttype::cholInv ( Mat< n, n, real > &  Inv,
const Mat< n, n, real > &  M 
)

Inversion of a positive symmetric definite (PSD) matrix using a Cholesky decomposition. Returns false if the matrix is not PSD.

template<int n, class real >
bool sofa::defaulttype::cholSlv ( Vec< n, real > &  x,
const Mat< n, n, real > &  M,
const Vec< n, real > &  b 
)

Cholesky solution: solve the system Mx=b using a Cholesky decomposition.

Precondition
M must be symmetric positive definite Returns false is the decomposition fails. If you have several solutions to perform with the same matrix M and different vectors b, it is more efficient to factor the matrix once and then use back-substitution for each vector.
SOFA_DEFAULTTYPE_API void sofa::defaulttype::cleanup ( )

Clean up the resources used by the SofaDefaultType library, as well as its dependency: SofaHelper.

template<int m, int n, typename Real >
Real sofa::defaulttype::cond ( Mat< m, n, Real > &  a)

return the condition number of the matrix a following the euclidian norm (using the svd decomposition to find singular values)

template<class Real >
defaulttype::Mat<3, 3, Real> sofa::defaulttype::crossProductMatrix ( const defaulttype::Vec< 3, Real > &  v)
inline

skew-symmetric mapping crossProductMatrix(v) * x = v.cross(x)

template<class real >
real sofa::defaulttype::determinant ( const MatSym< 3, real > &  m)
inline

Determinant of a 3x3 matrix.

template<class real >
real sofa::defaulttype::determinant ( const MatSym< 2, real > &  m)
inline

Determinant of a 2x2 matrix.

template<class real >
real sofa::defaulttype::determinant ( const Mat< 3, 3, real > &  m)
inline

Determinant of a 3x3 matrix.

template<class real >
real sofa::defaulttype::determinant ( const Mat< 2, 2, real > &  m)
inline

Determinant of a 2x2 matrix.

template<class real >
real sofa::defaulttype::determinant ( const Mat< 2, 3, real > &  m)
inline

Generalized-determinant of a 2x3 matrix. Mirko Radi, "About a Determinant of Rectangular 2×n Matrix and its Geometric Interpretation"

template<class real >
real sofa::defaulttype::determinant ( const Mat< 3, 2, real > &  m)
inline

Generalized-determinant of a 3x2 matrix. Mirko Radi, "About a Determinant of Rectangular 2×n Matrix and its Geometric Interpretation"

template<int N, class real >
Vec<N,real> sofa::defaulttype::diagonal ( const Mat< N, N, real > &  m)
inline

diagonal of a square matrix

template<int L, int C, typename T >
Mat<L,C,T> sofa::defaulttype::dyad ( const Vec< L, T > &  u,
const Vec< C, T > &  v 
)
inline

Create a matrix as $ u v^T $.

template<int N, typename T >
RigidDeriv<N,T>::Rot& sofa::defaulttype::getAngular ( RigidDeriv< N, T > &  v)
template<int N, typename T >
const RigidDeriv<N,T>::Rot& sofa::defaulttype::getAngular ( const RigidDeriv< N, T > &  v)
template<int N, typename T >
RigidDeriv<N,T>::Pos& sofa::defaulttype::getLinear ( RigidDeriv< N, T > &  v)
template<int N, typename T >
const RigidDeriv<N,T>::Pos& sofa::defaulttype::getLinear ( const RigidDeriv< N, T > &  v)
TemplateAliasesMap& sofa::defaulttype::getTemplateAliasesMap ( )
template<typename T >
const Vec<3, T> sofa::defaulttype::getVCenter ( const Vec< 6, T > &  v)
template<int N, typename T >
RigidDeriv<N,T>::Pos& sofa::defaulttype::getVCenter ( RigidDeriv< N, T > &  v)
template<int N, typename T >
const RigidDeriv<N,T>::Pos& sofa::defaulttype::getVCenter ( const RigidDeriv< N, T > &  v)
template<typename T >
const Vec<3, T> sofa::defaulttype::getVOrientation ( const Vec< 6, T > &  v)
template<int N, typename T >
RigidDeriv<N,T>::Rot& sofa::defaulttype::getVOrientation ( RigidDeriv< N, T > &  v)
template<int N, typename T >
const RigidDeriv<N,T>::Rot& sofa::defaulttype::getVOrientation ( const RigidDeriv< N, T > &  v)
int sofa::defaulttype::hexval ( char  c)
template<class real >
real sofa::defaulttype::infNorm ( const Mat< 3, 3, real > &  A)
inline
SOFA_DEFAULTTYPE_API void sofa::defaulttype::init ( )

Initialize the SofaDefaultType library, as well as it dependency: SofaHelper.

template<int S, class real >
bool sofa::defaulttype::invertMatrix ( MatSym< S, real > &  dest,
const MatSym< S, real > &  from 
)

Matrix inversion (general case).

template<class real >
bool sofa::defaulttype::invertMatrix ( MatSym< 3, real > &  dest,
const MatSym< 3, real > &  from 
)

Matrix inversion (special case 3x3).

template<class real >
bool sofa::defaulttype::invertMatrix ( MatSym< 2, real > &  dest,
const MatSym< 2, real > &  from 
)

Matrix inversion (special case 2x2).

template<int S, class real >
bool sofa::defaulttype::invertMatrix ( Mat< S, S, real > &  dest,
const Mat< S, S, real > &  from 
)

Matrix inversion (general case).

template<class real >
bool sofa::defaulttype::invertMatrix ( Mat< 3, 3, real > &  dest,
const Mat< 3, 3, real > &  from 
)

Matrix inversion (special case 3x3).

template<class real >
bool sofa::defaulttype::invertMatrix ( Mat< 2, 2, real > &  dest,
const Mat< 2, 2, real > &  from 
)

Matrix inversion (special case 2x2).

SOFA_DEFAULTTYPE_API bool sofa::defaulttype::isCleanedUp ( )

Return true if and only if the SofaDefaultType library has been cleaned up.

template<class T >
constexpr bool sofa::defaulttype::isDouble ( )
template<>
constexpr bool sofa::defaulttype::isDouble< double > ( )
SOFA_DEFAULTTYPE_API bool sofa::defaulttype::isInitialized ( )

Return true if and only if the SofaDefaultType library has been initialized.

constexpr bool sofa::defaulttype::isSRealDouble ( )
constexpr bool sofa::defaulttype::isSRealFloat ( )
bool sofa::defaulttype::isValidEncoding ( const std::string &  s)
template<int n, typename Real >
void sofa::defaulttype::lubksb ( const Mat< n, n, Real > &  a,
const Vec< n, int > &  indx,
Vec< n, Real > &  b 
)

Compute the solution of Mx=b. b is replaced by x. a and indx together represent the LU decomposition of m, as given my method ludcmp.

template<int n, typename Real >
void sofa::defaulttype::ludcmp ( Mat< n, n, Real > &  a,
Vec< n, int > &  indx 
)

Compute the LU decomposition of matrix a. a is replaced by its pivoted LU decomposition. indx stores pivoting indices.

template<int n, typename Real >
void sofa::defaulttype::luinv ( Mat< n, n, Real > &  inv,
Mat< n, n, Real > &  m 
)

Compute the inverse of matrix m.

Warning
Matrix m is replaced by its LU decomposition.
template<class real >
real sofa::defaulttype::oneNorm ( const Mat< 3, 3, real > &  A)
inline
template<typename real , typename real2 >
RigidDeriv<3,real> sofa::defaulttype::operator* ( RigidDeriv< 3, real >  r,
real2  a 
)
inline
template<typename real >
RigidDeriv<3,real> sofa::defaulttype::operator* ( const RigidDeriv< 3, real > &  d,
const RigidMass< 3, real > &  m 
)
inline
template<typename real >
RigidDeriv<3,real> sofa::defaulttype::operator* ( const RigidMass< 3, real > &  m,
const RigidDeriv< 3, real > &  d 
)
inline
template<typename real , typename real2 >
RigidDeriv<2,real> sofa::defaulttype::operator* ( RigidDeriv< 2, real >  r,
real2  a 
)
inline
template<typename real >
RigidDeriv<2,real> sofa::defaulttype::operator* ( const RigidDeriv< 2, real > &  d,
const RigidMass< 2, real > &  m 
)
inline
template<typename real , typename real2 >
RigidDeriv<3,real> sofa::defaulttype::operator/ ( RigidDeriv< 3, real >  r,
real2  a 
)
inline
template<typename real >
RigidDeriv<3,real> sofa::defaulttype::operator/ ( const RigidDeriv< 3, real > &  d,
const RigidMass< 3, real > &  m 
)
inline
template<typename real , typename real2 >
RigidDeriv<2,real> sofa::defaulttype::operator/ ( RigidDeriv< 2, real >  r,
real2  a 
)
inline
template<typename real >
RigidDeriv<2,real> sofa::defaulttype::operator/ ( const RigidDeriv< 2, real > &  d,
const RigidMass< 2, real > &  m 
)
inline
std::ostream& sofa::defaulttype::operator<< ( std::ostream &  out,
const sofa::defaulttype::Frame c 
)
template<int D, class real >
std::ostream& sofa::defaulttype::operator<< ( std::ostream &  o,
const MatSym< D, real > &  m 
)
template<int L, int C, typename real >
std::ostream& sofa::defaulttype::operator<< ( std::ostream &  o,
const Mat< L, C, real > &  m 
)
SOFA_DEFAULTTYPE_API std::istream& sofa::defaulttype::operator>> ( std::istream &  i,
RGBAColor t 
)
template<int D, class real >
std::istream& sofa::defaulttype::operator>> ( std::istream &  in,
MatSym< D, real > &  m 
)
template<int L, int C, typename real >
std::istream& sofa::defaulttype::operator>> ( std::istream &  in,
sofa::defaulttype::Mat< L, C, real > &  m 
)
template<int L, int C, typename real >
void sofa::defaulttype::printMaple ( std::ostream &  o,
const Mat< L, C, real > &  m 
)
template<int L, int C, typename real >
void sofa::defaulttype::printMatlab ( std::ostream &  o,
const Mat< L, C, real > &  m 
)

printing in other software formats

template<class T1 , class T2 >
T1 sofa::defaulttype::pythag ( const T1  a,
const T2  b 
)

Computes sqrt(a^2 + b^2) without destructive underflow or overflow.

template<class T1 , class T2 >
const T1 sofa::defaulttype::S_MAX ( const T1 &  a,
const T2 &  b 
)
inline

return the max of two values

template<class T1 , class T2 >
const T1 sofa::defaulttype::S_MIN ( const T1 &  a,
const T2 &  b 
)
inline

return the min of two values

template<class T1 , class T2 >
const T1 sofa::defaulttype::S_SIGN ( const T1 &  a,
const T2 &  b 
)
inline
template<class T >
const T sofa::defaulttype::S_SQR ( const T  a)
inline
template<int D, typename real >
real sofa::defaulttype::scalarProduct ( const MatSym< D, real > &  left,
const MatSym< D, real > &  right 
)
inline

Compute the scalar product of two matrix (sum of product of all terms)

template<int D, typename real >
real sofa::defaulttype::scalarProduct ( const MatSym< D, real > &  left,
const Mat< D, D, real > &  right 
)
inline
template<int D, typename real >
real sofa::defaulttype::scalarProduct ( const Mat< D, D, real > &  left,
const MatSym< D, real > &  right 
)
inline
template<int L, int C, typename real >
real sofa::defaulttype::scalarProduct ( const Mat< L, C, real > &  left,
const Mat< L, C, real > &  right 
)
inline

Compute the scalar product of two matrix (sum of product of all terms)

template<class MatrixRow , class VecDeriv >
VecDeriv::Real sofa::defaulttype::SparseMatrixVecDerivMult ( const MatrixRow &  row,
const VecDeriv &  vec 
)
template<int m, int n, typename Real >
void sofa::defaulttype::svddcmp ( Mat< m, n, Real > &  a,
Vec< n, Real > &  w,
Mat< n, m, Real > &  v 
)

Compute the SVD decomposition of matrix a (from nr). a is replaced by its pivoted LU decomposition. indx stores pivoting indices.

SVD decomposition a = u.w.vt

Precondition
a: original matrix, destroyed to become u
w: diagonal vector
v: matrix
template<class real >
real sofa::defaulttype::trace ( const MatSym< 3, real > &  m)
inline

Trace of a 3x3 matrix.

template<class real >
real sofa::defaulttype::trace ( const MatSym< 2, real > &  m)
inline

Trace of a 2x2 matrix.

template<int N, class real >
real sofa::defaulttype::trace ( const Mat< N, N, real > &  m)
inline

trace of a square matrix

template<int S, class real >
bool sofa::defaulttype::transformInvertMatrix ( Mat< S, S, real > &  dest,
const Mat< S, S, real > &  from 
)

Inverse Matrix considering the matrix as a transformation.

template<typename T , typename R >
Vec<3,T> sofa::defaulttype::velocityAtRotatedPoint ( const RigidDeriv< 3, R > &  v,
const Vec< 3, T > &  p 
)

Velocity at point p, where p is the offset from the origin of the frame, given in the same coordinate system as the velocity of the origin.

template<typename R , typename T >
Vec<2,R> sofa::defaulttype::velocityAtRotatedPoint ( const RigidDeriv< 2, T > &  v,
const Vec< 2, R > &  p 
)

Velocity at point p, where p is the offset from the origin of the frame, given in the same coordinate system as the velocity of the origin.

Variable Documentation

constexpr index_type sofa::defaulttype::InvalidID = UINT_MAX
template class SOFA_DEFAULTTYPE_API sofa::defaulttype::SolidTypes< double >
class SOFA_DEFAULTTYPE_API sofa::defaulttype::Transform

Base types for the ArticulatedSolid: position, orientation, velocity, angular velocity, etc.

Author
François Faure, INRIA-UJF, 2006