|
|
@@ -10,13 +10,13 @@
|
|
|
#include "cotmatrix_entries.h"
|
|
|
#include <Eigen/Dense>
|
|
|
|
|
|
-template <typename MatV, typename MatF, typename Scalar>
|
|
|
+template <typename MatV, typename MatF, typename MatK>
|
|
|
IGL_INLINE void igl::arap_linear_block(
|
|
|
const MatV & V,
|
|
|
const MatF & F,
|
|
|
const int d,
|
|
|
const igl::ARAPEnergyType energy,
|
|
|
- Eigen::SparseMatrix<Scalar> & Kd)
|
|
|
+ MatK & Kd)
|
|
|
{
|
|
|
switch(energy)
|
|
|
{
|
|
|
@@ -36,13 +36,15 @@ IGL_INLINE void igl::arap_linear_block(
|
|
|
}
|
|
|
|
|
|
|
|
|
-template <typename MatV, typename MatF, typename Scalar>
|
|
|
+template <typename MatV, typename MatF, typename MatK>
|
|
|
IGL_INLINE void igl::arap_linear_block_spokes(
|
|
|
const MatV & V,
|
|
|
const MatF & F,
|
|
|
const int d,
|
|
|
- Eigen::SparseMatrix<Scalar> & Kd)
|
|
|
+ MatK & Kd)
|
|
|
{
|
|
|
+ typedef typename MatK::Scalar Scalar;
|
|
|
+
|
|
|
using namespace std;
|
|
|
using namespace Eigen;
|
|
|
// simplex size (3: triangles, 4: tetrahedra)
|
|
|
@@ -101,13 +103,15 @@ IGL_INLINE void igl::arap_linear_block_spokes(
|
|
|
Kd.makeCompressed();
|
|
|
}
|
|
|
|
|
|
-template <typename MatV, typename MatF, typename Scalar>
|
|
|
+template <typename MatV, typename MatF, typename MatK>
|
|
|
IGL_INLINE void igl::arap_linear_block_spokes_and_rims(
|
|
|
const MatV & V,
|
|
|
const MatF & F,
|
|
|
const int d,
|
|
|
- Eigen::SparseMatrix<Scalar> & Kd)
|
|
|
+ MatK & Kd)
|
|
|
{
|
|
|
+ typedef typename MatK::Scalar Scalar;
|
|
|
+
|
|
|
using namespace std;
|
|
|
using namespace Eigen;
|
|
|
// simplex size (3: triangles, 4: tetrahedra)
|
|
|
@@ -183,13 +187,14 @@ IGL_INLINE void igl::arap_linear_block_spokes_and_rims(
|
|
|
Kd.makeCompressed();
|
|
|
}
|
|
|
|
|
|
-template <typename MatV, typename MatF, typename Scalar>
|
|
|
+template <typename MatV, typename MatF, typename MatK>
|
|
|
IGL_INLINE void igl::arap_linear_block_elements(
|
|
|
const MatV & V,
|
|
|
const MatF & F,
|
|
|
const int d,
|
|
|
- Eigen::SparseMatrix<Scalar> & Kd)
|
|
|
+ MatK & Kd)
|
|
|
{
|
|
|
+ typedef typename MatK::Scalar Scalar;
|
|
|
using namespace std;
|
|
|
using namespace Eigen;
|
|
|
// simplex size (3: triangles, 4: tetrahedra)
|
|
|
@@ -249,5 +254,6 @@ IGL_INLINE void igl::arap_linear_block_elements(
|
|
|
|
|
|
#ifdef IGL_STATIC_LIBRARY
|
|
|
// Explicit template instantiation
|
|
|
-template IGL_INLINE void igl::arap_linear_block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, double>(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<int, -1, -1, 0, -1, -1> const&, int, igl::ARAPEnergyType, Eigen::SparseMatrix<double, 0, int>&);
|
|
|
+template void igl::arap_linear_block<Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >, Eigen::SparseMatrix<double, 0, int> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, int, igl::ARAPEnergyType, Eigen::SparseMatrix<double, 0, int>&);
|
|
|
+template void igl::arap_linear_block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::SparseMatrix<double, 0, int> >(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<int, -1, -1, 0, -1, -1> const&, int, igl::ARAPEnergyType, Eigen::SparseMatrix<double, 0, int>&);
|
|
|
#endif
|