quad_edges.cpp 745 B

123456789101112131415161718192021222324
  1. #include "quad_edges.h"
  2. #include "unique_simplices.h"
  3. template <
  4. typename DerivedQ,
  5. typename DerivedE >
  6. IGL_INLINE void igl::quad_edges(
  7. const Eigen::MatrixBase<DerivedQ> & Q,
  8. Eigen::PlainObjectBase<DerivedE> & E)
  9. {
  10. E.resize(4*Q.rows(),2);
  11. E <<
  12. Q.col(0), Q.col(1),
  13. Q.col(1), Q.col(2),
  14. Q.col(2), Q.col(3),
  15. Q.col(3), Q.col(0);
  16. igl::unique_simplices(Eigen::MatrixXi(E),E);
  17. }
  18. #ifdef IGL_STATIC_LIBRARY
  19. // Explicit template instantiation
  20. // generated by autoexplicit.sh
  21. template void igl::quad_edges<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
  22. #endif