123456789101112131415161718192021222324252627282930313233 |
- #include "vf.h"
- #include "verbose.h"
- template <typename DerivedV, typename DerivedF, typename IndexType>
- IGL_INLINE void igl::vf(
- const Eigen::PlainObjectBase<DerivedV>& V,
- const Eigen::PlainObjectBase<DerivedF>& F,
- std::vector<std::vector<IndexType> >& VF,
- std::vector<std::vector<IndexType> >& VFi)
- {
- VF.clear();
- VFi.clear();
-
- VF.resize(V.rows());
- VFi.resize(V.rows());
-
- for(int fi=0; fi<F.rows(); ++fi)
- {
- for(int i = 0; i < F.cols(); ++i)
- {
- VF[F(fi,i)].push_back(fi);
- VFi[F(fi,i)].push_back(i);
- }
- }
- }
- #ifndef IGL_HEADER_ONLY
- // Explicit template specialization
- // generated by autoexplicit.sh
- template void igl::vf<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, int>(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&);
- template void igl::vf<Eigen::Matrix<double, -1, 3, 1, -1, 3>, Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1>, unsigned int>(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> > const&, std::vector<std::vector<unsigned int, std::allocator<unsigned int> >, std::allocator<std::vector<unsigned int, std::allocator<unsigned int> > > >&, std::vector<std::vector<unsigned int, std::allocator<unsigned int> >, std::allocator<std::vector<unsigned int, std::allocator<unsigned int> > > >&);
- #endif
|