per_face_normals.h 693 B

123456789101112131415161718192021222324
  1. #ifndef IGL_PER_FACE_NORMALS_H
  2. #define IGL_PER_FACE_NORMALS_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Core>
  5. namespace igl
  6. {
  7. // Compute face normals via vertex position list, face list
  8. // Inputs:
  9. // V #V by 3 eigen Matrix of mesh vertex 3D positions
  10. // F #F by 3 eigne Matrix of face (triangle) indices
  11. // Output:
  12. // N #F by 3 eigen Matrix of mesh face (triangle) 3D normals
  13. template <typename DerivedV, typename DerivedF>
  14. IGL_INLINE void per_face_normals(
  15. const Eigen::PlainObjectBase<DerivedV>& V,
  16. const Eigen::PlainObjectBase<DerivedF>& F,
  17. Eigen::PlainObjectBase<DerivedV> & N);
  18. }
  19. #ifdef IGL_HEADER_ONLY
  20. # include "per_face_normals.cpp"
  21. #endif
  22. #endif