Flow Visualisation
color_cast.hpp
Go to the documentation of this file.
1 
39 #ifndef GLM_GTX_color_cast
40 #define GLM_GTX_color_cast GLM_VERSION
41 
42 // Dependency:
43 #include "../glm.hpp"
44 #include "../gtx/number_precision.hpp"
45 
46 #if(defined(GLM_MESSAGES) && !defined(glm_ext))
47 # pragma message("GLM: GLM_GTX_color_cast extension included")
48 #endif
49 
50 namespace glm
51 {
54 
57  template <typename valType> uint8 u8channel_cast(valType a);
58 
61  template <typename valType> uint16 u16channel_cast(valType a);
62 
63  template <typename T> uint32 u32_rgbx_cast(const detail::tvec3<T>& c);
64  template <typename T> uint32 u32_xrgb_cast(const detail::tvec3<T>& c);
65  template <typename T> uint32 u32_bgrx_cast(const detail::tvec3<T>& c);
66  template <typename T> uint32 u32_xbgr_cast(const detail::tvec3<T>& c);
67 
68  template <typename T> uint32 u32_rgba_cast(const detail::tvec4<T>& c);
69  template <typename T> uint32 u32_argb_cast(const detail::tvec4<T>& c);
70  template <typename T> uint32 u32_bgra_cast(const detail::tvec4<T>& c);
71  template <typename T> uint32 u32_abgr_cast(const detail::tvec4<T>& c);
72 
73  template <typename T> uint64 u64_rgbx_cast(const detail::tvec3<T>& c);
74  template <typename T> uint64 u64_xrgb_cast(const detail::tvec3<T>& c);
75  template <typename T> uint64 u64_bgrx_cast(const detail::tvec3<T>& c);
76  template <typename T> uint64 u64_xbgr_cast(const detail::tvec3<T>& c);
77 
78  template <typename T> uint64 u64_rgba_cast(const detail::tvec4<T>& c);
79  template <typename T> uint64 u64_argb_cast(const detail::tvec4<T>& c);
80  template <typename T> uint64 u64_bgra_cast(const detail::tvec4<T>& c);
81  template <typename T> uint64 u64_abgr_cast(const detail::tvec4<T>& c);
82 
83  template <typename T> f16 f16_channel_cast(T a);
84 
85  template <typename T> f16vec3 f16_rgbx_cast(T c);
86  template <typename T> f16vec3 f16_xrgb_cast(T c);
87  template <typename T> f16vec3 f16_bgrx_cast(T c);
88  template <typename T> f16vec3 f16_xbgr_cast(T c);
89 
90  template <typename T> f16vec4 f16_rgba_cast(T c);
91  template <typename T> f16vec4 f16_argb_cast(T c);
92  template <typename T> f16vec4 f16_bgra_cast(T c);
93  template <typename T> f16vec4 f16_abgr_cast(T c);
94 
95  template <typename T> f32 f32_channel_cast(T a);
96 
97  template <typename T> f32vec3 f32_rgbx_cast(T c);
98  template <typename T> f32vec3 f32_xrgb_cast(T c);
99  template <typename T> f32vec3 f32_bgrx_cast(T c);
100  template <typename T> f32vec3 f32_xbgr_cast(T c);
101 
102  template <typename T> f32vec4 f32_rgba_cast(T c);
103  template <typename T> f32vec4 f32_argb_cast(T c);
104  template <typename T> f32vec4 f32_bgra_cast(T c);
105  template <typename T> f32vec4 f32_abgr_cast(T c);
106 
107  template <typename T> f64 f64_channel_cast(T a);
108 
109  template <typename T> f64vec3 f64_rgbx_cast(T c);
110  template <typename T> f64vec3 f64_xrgb_cast(T c);
111  template <typename T> f64vec3 f64_bgrx_cast(T c);
112  template <typename T> f64vec3 f64_xbgr_cast(T c);
113 
114  template <typename T> f64vec4 f64_rgba_cast(T c);
115  template <typename T> f64vec4 f64_argb_cast(T c);
116  template <typename T> f64vec4 f64_bgra_cast(T c);
117  template <typename T> f64vec4 f64_abgr_cast(T c);
118 
120 }//namespace glm
121 
122 #include "color_cast.inl"
123 
124 #endif//GLM_GTX_color_cast
f32vec3 f32_bgrx_cast(T c)
Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension...
f64vec3 f64_xbgr_cast(T c)
Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension...
detail::uint8 uint8
Definition: type_precision.hpp:187
detail::uint32 uint32
Definition: type_precision.hpp:195
detail::tvec4< f64 > f64vec4
Definition: type_precision.hpp:411
uint32 u32_abgr_cast(const detail::tvec4< T > &c)
Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extensi...
Definition: color_cast.inl:99
f16vec4 f16_abgr_cast(T c)
Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension...
Definition: _detail.hpp:38
float16 f16
Definition: type_precision.hpp:335
f16vec3 f16_xrgb_cast(T c)
Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension...
f64vec4 f64_argb_cast(T c)
Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension...
Definition: _swizzle.hpp:43
uint32 u32_bgra_cast(const detail::tvec4< T > &c)
Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extensi...
Definition: color_cast.inl:88
detail::tvec3< f64 > f64vec3
Definition: type_precision.hpp:407
uint64 u64_rgba_cast(const detail::tvec4< T > &c)
Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extensi...
Definition: color_cast.inl:151
f16 f16_channel_cast(T a)
Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extensio...
f32vec4 f32_argb_cast(T c)
Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension...
uint64 u64_bgra_cast(const detail::tvec4< T > &c)
Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extensi...
Definition: color_cast.inl:173
f32vec3 f32_rgbx_cast(T c)
Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension...
f64vec3 f64_bgrx_cast(T c)
Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension...
f32vec4 f32_abgr_cast(T c)
Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension...
detail::uint16 uint16
Definition: type_precision.hpp:191
uint64 u64_argb_cast(const detail::tvec4< T > &c)
Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extensi...
Definition: color_cast.inl:162
f32vec4 f32_bgra_cast(T c)
Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension...
uint16 u16channel_cast(valType a)
f64vec4 f64_bgra_cast(T c)
Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension...
f16vec3 f16_xbgr_cast(T c)
Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension...
uint64 u64_rgbx_cast(const detail::tvec3< T > &c)
Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extensi...
Definition: color_cast.inl:110
uint64 u64_xbgr_cast(const detail::tvec3< T > &c)
Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extensi...
float64 f64
Definition: type_precision.hpp:343
f16vec4 f16_argb_cast(T c)
Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension...
uint64 u64_xrgb_cast(const detail::tvec3< T > &c)
Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extensi...
f64 f64_channel_cast(T a)
Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extensio...
float32 f32
Definition: type_precision.hpp:339
detail::tvec4< f16 > f16vec4
Definition: type_precision.hpp:377
uint32 u32_xbgr_cast(const detail::tvec3< T > &c)
Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extensi...
Definition: color_cast.inl:55
uint8 u8channel_cast(valType a)
f32vec3 f32_xrgb_cast(T c)
Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension...
uint32 u32_rgba_cast(const detail::tvec4< T > &c)
Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extensi...
Definition: color_cast.inl:66
f32vec3 f32_xbgr_cast(T c)
Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension...
detail::uint64 uint64
Definition: type_precision.hpp:199
f32vec4 f32_rgba_cast(T c)
Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension...
detail::tvec3< f32 > f32vec3
Definition: type_precision.hpp:390
uint32 u32_xrgb_cast(const detail::tvec3< T > &c)
Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extensi...
Definition: color_cast.inl:35
f16vec3 f16_bgrx_cast(T c)
Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension...
f64vec3 f64_xrgb_cast(T c)
Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension...
f32 f32_channel_cast(T a)
Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extensio...
f64vec4 f64_abgr_cast(T c)
Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension...
f64vec3 f64_rgbx_cast(T c)
Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension...
f16vec3 f16_rgbx_cast(T c)
Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension...
f16vec4 f16_bgra_cast(T c)
Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension...
detail::tvec4< f32 > f32vec4
Definition: type_precision.hpp:394
uint32 u32_rgbx_cast(const detail::tvec3< T > &c)
Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extensi...
Definition: color_cast.inl:25
f64vec4 f64_rgba_cast(T c)
Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension...
uint32 u32_bgrx_cast(const detail::tvec3< T > &c)
Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extensi...
Definition: color_cast.inl:45
f16vec4 f16_rgba_cast(T c)
Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension...
uint32 u32_argb_cast(const detail::tvec4< T > &c)
Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extensi...
Definition: color_cast.inl:77
uint64 u64_abgr_cast(const detail::tvec4< T > &c)
Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extensi...
Definition: color_cast.inl:184
uint64 u64_bgrx_cast(const detail::tvec3< T > &c)
Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extensi...
detail::tvec3< f16 > f16vec3
Definition: type_precision.hpp:373