vf.cpp 568 B

1234567891011121314151617181920212223242526272829
  1. #include "vf.h"
  2. #include "verbose.h"
  3. template <typename T, typename S>
  4. IGL_INLINE void igl::vf(
  5. const Eigen::Matrix<S, Eigen::Dynamic, Eigen::Dynamic> & V,
  6. const Eigen::MatrixXi & F,
  7. std::vector<std::vector<T> >& VF, std::vector<std::vector<T> >& VFi)
  8. {
  9. VF.clear();
  10. VFi.clear();
  11. VF.resize(V.rows());
  12. VFi.resize(V.rows());
  13. for(int fi=0; fi<F.rows(); ++fi)
  14. {
  15. for(int i = 0; i < 3; ++i)
  16. {
  17. VF[F(fi,i)].push_back(fi);
  18. VFi[F(fi,i)].push_back(i);
  19. }
  20. }
  21. }
  22. #ifndef IGL_HEADER_ONLY
  23. // Explicit template specialization
  24. #endif