barycenter.h 591 B

12345678910111213141516171819202122232425262728
  1. #ifndef IGL_BARYCENTER_H
  2. #define IGL_BARYCENTER_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Dense>
  5. namespace igl
  6. {
  7. // BARYCENTER
  8. //
  9. // B = barycenter(V,F)
  10. //
  11. // Compute the barycenter of every triangle
  12. //
  13. // Inputs:
  14. // V #V x dim matrix of vertex coordinates
  15. // F #F x simplex_size matrix of indices of triangle corners
  16. // Output:
  17. // BC a #F x dim matrix of 3d vertices
  18. IGL_INLINE void barycenter(
  19. const Eigen::MatrixXd & V,
  20. const Eigen::MatrixXi & F,
  21. Eigen::MatrixXd & BC);
  22. }
  23. #ifdef IGL_HEADER_ONLY
  24. # include "barycenter.cpp"
  25. #endif
  26. #endif