18 #include <Eigen/Sparse> 23 #pragma clang diagnostic push 24 #pragma clang diagnostic ignored "-Wpadded" 49 template <
class DerivedV,
class DerivedF>
51 Eigen::MatrixBase<DerivedF>
const &F, T sigma)
52 : V0_(V), F_(F), sigmaSqInv_(static_cast<T>(1) / (sigma * sigma)) {
66 VertexMatrix<Scalar>
fit(VertexMatrix<Scalar>
const &Y,
67 VertexMatrix<Scalar>
const &N,
68 Eigen::Matrix<Scalar, Eigen::Dynamic, 1>
const &gamma);
71 using RotationMatrix = Eigen::Matrix<Scalar, 3, Eigen::Dynamic>;
74 void computeLaplacian();
78 void initRotationMatrix();
82 void optimizePositions(
83 Eigen::Matrix<Scalar, Eigen::Dynamic, 1>
const &d,
84 Eigen::ConjugateGradient<Eigen::SparseMatrix<Scalar>,
85 Eigen::Lower | Eigen::Upper> &solver,
86 Eigen::Matrix<Scalar, Eigen::Dynamic, 1> &cOut,
87 VertexMatrix<Scalar> &Vout)
const;
90 void optimizeRotations(VertexMatrix<Scalar>
const &V);
93 Scalar rigidityEnergy(VertexMatrix<Scalar>
const &V)
const;
96 VertexMatrix<Scalar> V0_;
102 LaplacianMatrix<Scalar> L_;
106 #pragma clang diagnostic pop Name namespace for CortidQCT library.
Definition: CortidQCT.h:23
A triangle mesh class.
Definition: BarycentricPoint.h:20
This class implements a weighted as-rigid-as-possible mesh fitting algorithm that uses a point-to-pla...
Definition: WeightedARAPFitter.h:31
WeightedARAPFitter(Eigen::MatrixBase< DerivedV > const &V, Eigen::MatrixBase< DerivedF > const &F, T sigma)
Constructs an object that can be used to fit the given reference mesh.
Definition: WeightedARAPFitter.h:50
WeightedARAPFitter(Mesh< T > const &referenceMesh, T sigma)
Constructs an object that can be used to fit the given reference mesh.
Definition: WeightedARAPFitter.cpp:82
VertexMatrix< Scalar > fit(VertexMatrix< Scalar > const &Y, VertexMatrix< Scalar > const &N, Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > const &gamma)
Fits the reference mesh to the given target vertices by minimizing the wiehgted point-to-plane distan...
Definition: WeightedARAPFitter.cpp:199
This header contains mesh related helper functions.