mvc.h 1019 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
  4. //
  5. // This Source Code Form is subject to the terms of the Mozilla Public License
  6. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  7. // obtain one at http://mozilla.org/MPL/2.0/.
  8. #ifndef IGL_MVC_H
  9. #define IGL_MVC_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Dense>
  12. namespace igl
  13. {
  14. // MVC - MEAN VALUE COORDINATES
  15. //
  16. // mvc(V,C,W)
  17. //
  18. // Inputs:
  19. // V #V x dim list of vertex positions (dim = 2 or dim = 3)
  20. // C #C x dim list of polygon vertex positions in counter-clockwise order
  21. // (dim = 2 or dim = 3)
  22. //
  23. // Outputs:
  24. // W weights, #V by #C matrix of weights
  25. //
  26. // Known Bugs: implementation is listed as "Broken"
  27. IGL_INLINE void mvc(
  28. const Eigen::MatrixXd &V,
  29. const Eigen::MatrixXd &C,
  30. Eigen::MatrixXd &W);
  31. }
  32. #ifndef IGL_STATIC_LIBRARY
  33. # include "mvc.cpp"
  34. #endif
  35. #endif