isolines.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2017 Oded Stein <oded.stein@columbia.edu>
  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. //
  18. // Inputs:
  19. // V #V by dim list of mesh vertex positions
  20. // F #F by 3 list of mesh faces (must be triangles)
  21. // z #V by 1 list of function values evaluated at vertices
  22. // n the number of desired isolines
  23. // Outputs:
  24. // isoV #isoV by dim list of isoline vertex positions
  25. // isoE #isoE by 2 list of isoline edge positions
  26. //
  27. //
  28. template <typename DerivedV,
  29. typename DerivedF,
  30. typename DerivedZ,
  31. typename DerivedIsoV,
  32. typename DerivedIsoE>
  33. IGL_INLINE void isolines(
  34. const Eigen::MatrixBase<DerivedV>& V,
  35. const Eigen::MatrixBase<DerivedF>& F,
  36. const Eigen::MatrixBase<DerivedZ>& z,
  37. const int n,
  38. Eigen::PlainObjectBase<DerivedIsoV>& isoV,
  39. Eigen::PlainObjectBase<DerivedIsoE>& isoE);
  40. }
  41. #ifndef IGL_STATIC_LIBRARY
  42. # include "isolines.cpp"
  43. #endif
  44. #endif