#include <CenterOfMassMapping.h>
mapping computing the center of mass of an object. the output of the mapping has to be a single dof. Its position is then set from the input DOFs, proportionally to their mass. This allow to control an object by setting forces on its center of mass.
Protected Attributes | |
sofa::core::behavior::BaseMass * | masses |
pointer on the input DOFs mass More... | |
double | totalMass |
the total mass of the input object More... | |
Public Member Functions | |
SOFA_CLASS (SOFA_TEMPLATE2(CenterOfMassMapping, TIn, TOut), SOFA_TEMPLATE2(LinearMapping, TIn, TOut)) | |
void | init () 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 *, InDataMatrixDeriv &, const OutDataMatrixDeriv &) override |
void | draw (const core::visual::VisualParams *vparams) override |
![]() | |
SOFA_CLASS (SOFA_TEMPLATE(CRTPLinearMapping, TMapping), TMapping) | |
virtual bool | isLinear () const override |
Protected Member Functions | |
CenterOfMassMapping () | |
virtual | ~CenterOfMassMapping () |
|
protected |
pointer on the input DOFs mass
|
protected |
the total mass of the input object
|
inlineprotected |
|
inlineprotectedvirtual |
|
override |
|
override |
|
inlineoverride |
|
override |
|
override |
|
override |
sofa::component::mapping::linear::CenterOfMassMapping< TIn, TOut >::SOFA_CLASS | ( | SOFA_TEMPLATE2(CenterOfMassMapping< TIn, TOut >, TIn, TOut) | , |
SOFA_TEMPLATE2(LinearMapping, TIn, TOut) | |||
) |