isolines_map.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef IGL_ISOLINES_MAP_H
  2. #define IGL_ISOLINES_MAP_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Core>
  5. namespace igl
  6. {
  7. /// Inject a given colormap with evenly spaced isolines.
  8. ///
  9. /// @param[in] CM #CM by 3 list of colors
  10. /// @param[in] ico_color 1 by 3 isoline color
  11. /// @param[in] interval_thickness number of times to repeat intervals (original colors)
  12. /// @param[in] iso_thickness number of times to repeat isoline color (in between
  13. /// intervals)
  14. /// @param[out] ICM #CM*interval_thickness + (#CM-1)*iso_thickness by 3 list of outputs
  15. /// colors
  16. template <
  17. typename DerivedCM,
  18. typename Derivediso_color,
  19. typename DerivedICM >
  20. IGL_INLINE void isolines_map(
  21. const Eigen::MatrixBase<DerivedCM> & CM,
  22. const Eigen::MatrixBase<Derivediso_color> & iso_color,
  23. const int interval_thickness,
  24. const int iso_thickness,
  25. Eigen::PlainObjectBase<DerivedICM> & ICM);
  26. /// \overload
  27. template <
  28. typename DerivedCM,
  29. typename DerivedICM>
  30. IGL_INLINE void isolines_map(
  31. const Eigen::MatrixBase<DerivedCM> & CM,
  32. Eigen::PlainObjectBase<DerivedICM> & ICM);
  33. }
  34. #ifndef IGL_STATIC_LIBRARY
  35. # include "isolines_map.cpp"
  36. #endif
  37. #endif