jet.h 803 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef IGL_JET_H
  2. #define IGL_JET_H
  3. #include "igl_inline.h"
  4. //#ifndef IGL_NO_EIGEN
  5. //# include <Eigen/Dense>
  6. //#endif
  7. namespace igl
  8. {
  9. // JET like MATLAB's jet
  10. //
  11. // Inputs:
  12. // m number of colors
  13. // Outputs:
  14. // J m by list of RGB colors between 0 and 1
  15. //
  16. //#ifndef IGL_NO_EIGEN
  17. // void jet(const int m, Eigen::MatrixXd & J);
  18. //#endif
  19. // Wrapper for directly computing [r,g,b] values for a given factor f between
  20. // 0 and 1
  21. //
  22. // Inputs:
  23. // f factor determining color value as if 0 was min and 1 was max
  24. // Outputs:
  25. // r red value
  26. // g green value
  27. // b blue value
  28. template <typename T>
  29. void jet(const T f, T * rgb);
  30. template <typename T>
  31. void jet(const T f, T & r, T & g, T & b);
  32. };
  33. #ifdef IGL_HEADER_ONLY
  34. # include "jet.cpp"
  35. #endif
  36. #endif