inradius.h 991 B

123456789101112131415161718192021222324252627282930313233
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2016 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_INRADIUS_H
  9. #define IGL_INRADIUS_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Core>
  12. namespace igl
  13. {
  14. /// Compute the inradius of each triangle in a mesh (V,F)
  15. ///
  16. /// @param[in] V #V by dim list of mesh vertex positions
  17. /// @param[in] F #F by 3 list of triangle indices into V
  18. /// @param[out] R #F list of inradii
  19. ///
  20. template <
  21. typename DerivedV,
  22. typename DerivedF,
  23. typename DerivedR>
  24. IGL_INLINE void inradius(
  25. const Eigen::MatrixBase<DerivedV> & V,
  26. const Eigen::MatrixBase<DerivedF> & F,
  27. Eigen::PlainObjectBase<DerivedR> & R);
  28. }
  29. #ifndef IGL_STATIC_LIBRARY
  30. # include "inradius.cpp"
  31. #endif
  32. #endif