GLM  0.9.5
color_space.hpp
Go to the documentation of this file.
1 
38 #ifndef GLM_GTX_color_space
39 #define GLM_GTX_color_space
40 
41 // Dependency:
42 #include "../glm.hpp"
43 
44 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
45 # pragma message("GLM: GLM_GTX_color_space extension included")
46 #endif
47 
48 namespace glm
49 {
52 
55  template <typename T, precision P>
56  detail::tvec3<T, P> rgbColor(
57  detail::tvec3<T, P> const & hsvValue);
58 
61  template <typename T, precision P>
62  detail::tvec3<T, P> hsvColor(
63  detail::tvec3<T, P> const & rgbValue);
64 
67  template <typename T, precision P>
68  detail::tmat4x4<T, P> saturation(
69  T const s);
70 
73  template <typename T, precision P>
74  detail::tvec3<T, P> saturation(
75  T const s,
76  detail::tvec3<T, P> const & color);
77 
80  template <typename T, precision P>
81  detail::tvec4<T, P> saturation(
82  T const s,
83  detail::tvec4<T, P> const & color);
84 
87  template <typename T, precision P>
88  T luminosity(
89  detail::tvec3<T, P> const & color);
90 
92 }//namespace glm
93 
94 #include "color_space.inl"
95 
96 #endif//GLM_GTX_color_space
detail::tvec3< T, P > hsvColor(detail::tvec3< T, P > const &rgbValue)
Converts a color from RGB color space to its color in HSV color space.
detail::tmat4x4< T, P > saturation(T const s)
Build a saturation matrix.
detail::tvec3< T, P > rgbColor(detail::tvec3< T, P > const &hsvValue)
Converts a color from HSV color space to its color in RGB color space.
T luminosity(detail::tvec3< T, P > const &color)
Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals.