hsv_to_rgb.h 590 B

1234567891011121314151617181920212223242526272829
  1. #ifndef IGL_HSV_TO_RGB_H
  2. #define IGL_HSV_TO_RGB_H
  3. #include "igl_inline.h"
  4. namespace igl
  5. {
  6. // Convert RGB to HSV
  7. //
  8. // Inputs:
  9. // h hue value (degrees: [0,360])
  10. // s saturation value ([0,1])
  11. // v value value ([0,1])
  12. // Outputs:
  13. // r red value ([0,1])
  14. // g green value ([0,1])
  15. // b blue value ([0,1])
  16. template <typename T>
  17. void hsv_to_rgb(const T * hsv, T * rgb);
  18. template <typename T>
  19. void hsv_to_rgb(
  20. const T & h, const T & s, const T & v,
  21. T & r, T & g, T & b);
  22. };
  23. #ifdef IGL_HEADER_ONLY
  24. # include "hsv_to_rgb.cpp"
  25. #endif
  26. #endif