per_face_normals.h 594 B

1234567891011121314151617181920212223
  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. IGL_INLINE void per_face_normals(
  14. const Eigen::MatrixXd & V,
  15. const Eigen::MatrixXi & F,
  16. Eigen::MatrixXd & N);
  17. }
  18. #ifdef IGL_HEADER_ONLY
  19. # include "per_face_normals.cpp"
  20. #endif
  21. #endif