internal_angles.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2015 Alec Jacobson <[email protected]>
  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_INTERNAL_ANGLES_H
  9. #define IGL_INTERNAL_ANGLES_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Core>
  12. namespace igl
  13. {
  14. /// Compute internal angles for a triangle mesh
  15. ///
  16. /// @param[in] V #V by dim eigen Matrix of mesh vertex nD positions
  17. /// @param[in] F #F by poly-size eigen Matrix of face (triangle) indices
  18. /// @param[out] K #F by poly-size eigen Matrix of internal angles
  19. /// for triangles, columns correspond to edges [1,2],[2,0],[0,1]
  20. ///
  21. /// \note if poly-size ≠ 3 then dim must equal 3.
  22. template <typename DerivedV, typename DerivedF, typename DerivedK>
  23. IGL_INLINE void internal_angles(
  24. const Eigen::MatrixBase<DerivedV>& V,
  25. const Eigen::MatrixBase<DerivedF>& F,
  26. Eigen::PlainObjectBase<DerivedK> & K);
  27. }
  28. #ifndef IGL_STATIC_LIBRARY
  29. # include "internal_angles.cpp"
  30. #endif
  31. #endif