SOFA API  93933a5d
Open source framework for multi-physics simuation
sofa::component::mapping::linear::SkinningMapping< TIn, TOut > Class Template Reference

#include <SkinningMapping.h>

Inheritance diagram for sofa::component::mapping::linear::SkinningMapping< TIn, TOut >:

Public Attributes

Data< unsigned int > d_showFromIndex
 Displayed From Index. More...
 
Data< boold_showWeights
 Show influence. More...
 
SeqTriangles triangles
 

Protected Attributes

Data< std::string > f_initPos
 
Data< type::vector< unsigned int > > nbRef
 
Data< std::string > f_index
 
Data< double > weight
 
Data< unsigned int > showFromIndex
 
Data< boolshowWeights
 
Data< OutVecCoordd_initPos
 initial child coordinates in the world reference frame. More...
 
type::vector< type::vector< OutCoord > > f_localPos
 
type::vector< type::vector< OutCoord > > f_rotatedPos
 initial child coordinates in local frame x weight : dp = dMa_i (w_i \bar M_i f_localPos) More...
 
SparseJMatrixEigen _J
 rotated child coordinates : dp = Omega_i x f_rotatedPos : More...
 
Data< type::vector< unsigned int > > d_nbRef
 jacobian matrix for compliant API More...
 
Data< type::vector< sofa::type::SVector< unsigned int > > > d_index
 parent indices for each child. More...
 
Data< type::vector< sofa::type::SVector< InReal > > > d_weight
 influence weights of the Dofs. More...
 

Public Member Functions

 SOFA_CLASS (SOFA_TEMPLATE2(SkinningMapping, TIn, TOut), SOFA_TEMPLATE2(LinearMapping, TIn, TOut))
 
void setWeights (const type::vector< sofa::type::SVector< InReal > > &weights, const type::vector< sofa::type::SVector< unsigned int > > &indices, const type::vector< unsigned int > &nbrefs)
 
void init () override
 
void reinit () override
 
void apply (const sofa::core::MechanicalParams *mparams, OutDataVecCoord &out, const InDataVecCoord &in) override
 
void applyJ (const sofa::core::MechanicalParams *mparams, OutDataVecDeriv &out, const InDataVecDeriv &in) override
 
void applyJT (const sofa::core::MechanicalParams *mparams, InDataVecDeriv &out, const OutDataVecDeriv &in) override
 
void applyJT (const sofa::core::ConstraintParams *cparams, InDataMatrixDeriv &out, const OutDataMatrixDeriv &in) override
 
const type::vector< sofa::linearalgebra::BaseMatrix * > * getJs () override
 
const sofa::linearalgebra::BaseMatrixgetJ () override
 
void draw (const core::visual::VisualParams *vparams) override
 
- Public Member Functions inherited from sofa::component::mapping::linear::crtp::CRTPLinearMapping< TMapping >
 SOFA_CLASS (SOFA_TEMPLATE(CRTPLinearMapping, TMapping), TMapping)
 
virtual bool isLinear () const override
 

Protected Member Functions

void updateWeights ()
 
 SkinningMapping ()
 
virtual ~SkinningMapping ()
 

Attribute details

◆ _J

template<class TIn , class TOut >
SparseJMatrixEigen sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::_J
protected

rotated child coordinates : dp = Omega_i x f_rotatedPos :

◆ d_index

template<class TIn , class TOut >
Data< type::vector<sofa::type::SVector<unsigned int> > > sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::d_index
protected

parent indices for each child.

◆ d_initPos

template<class TIn , class TOut >
Data<OutVecCoord> sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::d_initPos
protected

initial child coordinates in the world reference frame.

◆ d_nbRef

template<class TIn , class TOut >
Data< type::vector<unsigned int> > sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::d_nbRef
protected

jacobian matrix for compliant API

Number of primitives influencing each point.

◆ d_showFromIndex

template<class TIn , class TOut >
Data<unsigned int> sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::d_showFromIndex

Displayed From Index.

◆ d_showWeights

template<class TIn , class TOut >
Data<bool> sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::d_showWeights

Show influence.

◆ d_weight

template<class TIn , class TOut >
Data< type::vector<sofa::type::SVector<InReal> > > sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::d_weight
protected

influence weights of the Dofs.

◆ f_index

template<class TIn , class TOut >
Data<std::string> sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::f_index
protected

◆ f_initPos

template<class TIn , class TOut >
Data<std::string> sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::f_initPos
protected

◆ f_localPos

template<class TIn , class TOut >
type::vector<type::vector<OutCoord> > sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::f_localPos
protected

◆ f_rotatedPos

template<class TIn , class TOut >
type::vector<type::vector<OutCoord> > sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::f_rotatedPos
protected

initial child coordinates in local frame x weight : dp = dMa_i (w_i \bar M_i f_localPos)

◆ nbRef

template<class TIn , class TOut >
Data< type::vector<unsigned int> > sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::nbRef
protected

◆ showFromIndex

template<class TIn , class TOut >
Data<unsigned int> sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::showFromIndex
protected

◆ showWeights

template<class TIn , class TOut >
Data<bool> sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::showWeights
protected

◆ triangles

template<class TIn , class TOut >
SeqTriangles sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::triangles

◆ weight

template<class TIn , class TOut >
Data<double> sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::weight
protected

Constructor details

◆ SkinningMapping()

template<class TIn , class TOut >
sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::SkinningMapping
protected

◆ ~SkinningMapping()

template<class TIn , class TOut >
sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::~SkinningMapping
protectedvirtual

Function details

◆ apply()

template<class TIn , class TOut >
void sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::apply ( const sofa::core::MechanicalParams mparams,
OutDataVecCoord out,
const InDataVecCoord in 
)
override

◆ applyJ()

template<class TIn , class TOut >
void sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::applyJ ( const sofa::core::MechanicalParams mparams,
OutDataVecDeriv out,
const InDataVecDeriv in 
)
override

◆ applyJT() [1/2]

template<class TIn , class TOut >
void sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::applyJT ( const sofa::core::ConstraintParams cparams,
InDataMatrixDeriv out,
const OutDataMatrixDeriv in 
)
override

◆ applyJT() [2/2]

template<class TIn , class TOut >
void sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::applyJT ( const sofa::core::MechanicalParams mparams,
InDataVecDeriv out,
const OutDataVecDeriv in 
)
override

◆ draw()

template<class TIn , class TOut >
void sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::draw ( const core::visual::VisualParams vparams)
override

◆ getJ()

template<class TIn , class TOut >
const sofa::linearalgebra::BaseMatrix * sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::getJ
override

◆ getJs()

template<class TIn , class TOut >
const sofa::type::vector< sofa::linearalgebra::BaseMatrix * > * sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::getJs
override

◆ init()

template<class TIn , class TOut >
void sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::init ( void  )
override

◆ reinit()

template<class TIn , class TOut >
void sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::reinit
override

◆ setWeights()

template<class TIn , class TOut >
void sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::setWeights ( const type::vector< sofa::type::SVector< InReal > > &  weights,
const type::vector< sofa::type::SVector< unsigned int > > &  indices,
const type::vector< unsigned int > &  nbrefs 
)

◆ SOFA_CLASS()

template<class TIn , class TOut >
sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::SOFA_CLASS ( SOFA_TEMPLATE2(SkinningMapping< TIn, TOut >, TIn, TOut)  ,
SOFA_TEMPLATE2(LinearMapping, TIn, TOut)   
)

◆ updateWeights()

template<class TIn , class TOut >
void sofa::component::mapping::linear::SkinningMapping< TIn, TOut >::updateWeights
protected