isolines.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2017 Oded Stein <[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_ISOLINES_H
  9. #define IGL_ISOLINES_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Dense>
  12. #include <Eigen/Sparse>
  13. namespace igl
  14. {
  15. /// Constructs isolines for a function z given on a mesh (V,F)
  16. ///
  17. /// @param[in] V #V by dim list of mesh vertex positions
  18. /// @param[in] F #F by 3 list of mesh faces (must be triangles)
  19. /// @param[in] z #V by 1 list of function values evaluated at vertices
  20. /// @param[in] n the number of desired isolines
  21. /// @param[out] isoV #isoV by dim list of isoline vertex positions
  22. /// @param[out] isoE #isoE by 2 list of isoline edge positions
  23. ///
  24. template <typename DerivedV,
  25. typename DerivedF,
  26. typename DerivedZ,
  27. typename DerivedIsoV,
  28. typename DerivedIsoE>
  29. IGL_INLINE void isolines(
  30. const Eigen::MatrixBase<DerivedV>& V,
  31. const Eigen::MatrixBase<DerivedF>& F,
  32. const Eigen::MatrixBase<DerivedZ>& z,
  33. const int n,
  34. Eigen::PlainObjectBase<DerivedIsoV>& isoV,
  35. Eigen::PlainObjectBase<DerivedIsoE>& isoE);
  36. }
  37. #ifndef IGL_STATIC_LIBRARY
  38. # include "isolines.cpp"
  39. #endif
  40. #endif