123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- // This file is part of libigl, a simple c++ geometry processing library.
- //
- // Copyright (C) 2018 Alec Jacobson <alecjacobson@gmail.com>
- //
- // This Source Code Form is subject to the terms of the Mozilla Public License
- // v. 2.0. If a copy of the MPL was not distributed with this file, You can
- // obtain one at http://mozilla.org/MPL/2.0/.
- #include "intrinsic_delaunay_cotmatrix.h"
- #include "edge_lengths.h"
- #include "intrinsic_delaunay_triangulation.h"
- #include "cotmatrix_intrinsic.h"
- #include <cassert>
- template <typename DerivedV, typename DerivedF, typename Scalar>
- IGL_INLINE void igl::intrinsic_delaunay_cotmatrix(
- const Eigen::MatrixBase<DerivedV> & V,
- const Eigen::MatrixBase<DerivedF> & F,
- Eigen::SparseMatrix<Scalar>& L)
- {
- Eigen::Matrix<Scalar, Eigen::Dynamic, 3> l_intrinsic;
- DerivedF F_intrinsic;
- return igl::intrinsic_delaunay_cotmatrix(V,F,L,l_intrinsic,F_intrinsic);
- }
- template <
- typename DerivedV,
- typename DerivedF,
- typename Scalar,
- typename Derivedl_intrinsic,
- typename DerivedF_intrinsic>
- IGL_INLINE void igl::intrinsic_delaunay_cotmatrix(
- const Eigen::MatrixBase<DerivedV> & V,
- const Eigen::MatrixBase<DerivedF> & F,
- Eigen::SparseMatrix<Scalar>& L,
- Eigen::PlainObjectBase<Derivedl_intrinsic> & l_intrinsic,
- Eigen::PlainObjectBase<DerivedF_intrinsic> & F_intrinsic)
- {
- assert(F.cols() == 3 && "Only triangles are supported");
- Eigen::Matrix<Scalar, Eigen::Dynamic, 3> l;
- igl::edge_lengths(V,F,l);
- igl::intrinsic_delaunay_triangulation(l,F,l_intrinsic,F_intrinsic);
- igl::cotmatrix_intrinsic(l_intrinsic,F_intrinsic,L);
- }
- #ifdef IGL_STATIC_LIBRARY
- // Explicit template instantiation
- // generated by autoexplicit.sh
- template void igl::intrinsic_delaunay_cotmatrix<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, double, Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::SparseMatrix<double, 0, int>&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
- // generated by autoexplicit.sh
- template void igl::intrinsic_delaunay_cotmatrix<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, double>(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::SparseMatrix<double, 0, int>&);
- // generated by autoexplicit.sh
- template void igl::intrinsic_delaunay_cotmatrix<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>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::SparseMatrix<double, 0, int>&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
- // generated by autoexplicit.sh
- #endif
|