8#ifndef IGL_ARAP_ENERGY_TYPE_DOF_H
9#define IGL_ARAP_ENERGY_TYPE_DOF_H
13#include <Eigen/Sparse>
58 template <
typename LbsMatrixType,
typename SSCALAR>
87 template <
typename LbsMatrixType,
typename SSCALAR>
89 const Eigen::MatrixXd & V,
90 const Eigen::MatrixXi & F,
91 const LbsMatrixType & M,
92 const Eigen::Matrix<int,Eigen::Dynamic,1> & G,
116 template <
typename LbsMatrixType,
typename SSCALAR>
118 const Eigen::Matrix<int,Eigen::Dynamic,1> & fixed_dim,
119 const Eigen::SparseMatrix<double> & A_eq,
138 template <
typename LbsMatrixType,
typename SSCALAR>
141 const Eigen::Matrix<double,Eigen::Dynamic,1> & B_eq,
142 const Eigen::MatrixXd & L0,
152 template <
typename LbsMatrixType,
typename SSCALAR>
156 typedef Eigen::Matrix<SSCALAR, Eigen::Dynamic, Eigen::Dynamic>
MatrixXS;
242#ifndef IGL_STATIC_LIBRARY
243# include "arap_dof.cpp"
#define IGL_INLINE
Definition igl_inline.h:15
bool arap_dof_precomputation(const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const LbsMatrixType &M, const Eigen::Matrix< int, Eigen::Dynamic, 1 > &G, ArapDOFData< LbsMatrixType, SSCALAR > &data)
Precomputes the system to optimize for "Fast Automatic Skinning Transformations" [Jacobson et al....
bool arap_dof_update(const ArapDOFData< LbsMatrixType, SSCALAR > &data, const Eigen::Matrix< double, Eigen::Dynamic, 1 > &B_eq, const Eigen::MatrixXd &L0, const int max_iters, const double tol, Eigen::MatrixXd &L)
Optimizes the transformations attached to each weight function based on precomputed system.
bool arap_dof_recomputation(const Eigen::Matrix< int, Eigen::Dynamic, 1 > &fixed_dim, const Eigen::SparseMatrix< double > &A_eq, ArapDOFData< LbsMatrixType, SSCALAR > &data)
Should always be called after arap_dof_precomputation, but may be called in between successive calls ...
ARAPEnergyType
Enum for choosing ARAP energy type.
Definition ARAPEnergyType.h:14
@ ARAP_ENERGY_TYPE_SPOKES
"As-rigid-as-possible Surface Modeling" by [Sorkine and Alexa 2007], rotations defined at vertices af...
Definition ARAPEnergyType.h:17
Structure that contains fields for all precomputed data or data that needs to be remembered at update...
Definition arap_dof.h:154
ArapDOFData()
Definition arap_dof.h:231
Eigen::Matrix< int, Eigen::Dynamic, 1 > fixed_dim
List of indices of fixed transformation entries.
Definition arap_dof.h:160
MatrixXS M_FullSolve
Full solve matrix that contains also conversion from rotations to the right hand side,...
Definition arap_dof.h:187
MatrixXS L0
#handles * dim * dim+1 list of transformation entries from previous solve
Definition arap_dof.h:207
MatrixXS Lvel0
"Velocity"
Definition arap_dof.h:212
bool with_dynamics
dynamics
Definition arap_dof.h:198
int n
Number of mesh vertices.
Definition arap_dof.h:167
MatrixXS Pi_1
Π1 from the paper.
Definition arap_dof.h:228
MatrixXS fext
#V by dim matrix of external forces
Definition arap_dof.h:215
double grav_mag
Magnitude of gravity.
Definition arap_dof.h:225
MatrixXS CSM
Precomputed condensed matrices (3x3 commutators folded to 1x1):
Definition arap_dof.h:190
igl::ARAPEnergyType energy
Type of arap energy we're solving.
Definition arap_dof.h:158
bool print_timings
Print timings at each update.
Definition arap_dof.h:195
std::vector< Eigen::MatrixXd > CSM_M
List of precomputed covariance scatter matrices multiplied by lbs matrices.
Definition arap_dof.h:163
int m
Number of weight functions.
Definition arap_dof.h:169
LbsMatrixType Mass_tilde
Mass_tilde: MT * Mass * M.
Definition arap_dof.h:218
std::vector< bool > free_mask
Mask of free variables.
Definition arap_dof.h:177
int dim
Number of dimensions.
Definition arap_dof.h:171
Eigen::Matrix< SSCALAR, Eigen::Dynamic, Eigen::Dynamic > MatrixXS
Matrix with SSCALAR type.
Definition arap_dof.h:156
Eigen::MatrixXd fgrav
Force due to gravity (premultiplier)
Definition arap_dof.h:221
Eigen::Vector3d grav_dir
Direction of gravity.
Definition arap_dof.h:223
int effective_dim
Effective dimensions.
Definition arap_dof.h:173
double h
Time step.
Definition arap_dof.h:203
Eigen::Matrix< int, Eigen::Dynamic, 1 > interpolated
List of indices into C of positional constraints.
Definition arap_dof.h:175
LbsMatrixType Q
Full quadratic coefficients matrix before lagrangian (should be dense)
Definition arap_dof.h:179