16 #include "../detail/setup.hpp"
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_range is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
21 # pragma message("GLM: GLM_GTX_range extension included")
24 #include "../gtc/type_ptr.hpp"
25 #include "../gtc/vec1.hpp"
32 # if GLM_COMPILER & GLM_COMPILER_VC
33 # pragma warning(push)
34 # pragma warning(disable : 4100) // unreferenced formal parameter
37 template<
typename T, qualifier Q>
38 inline length_t components(vec<1, T, Q>
const& v)
43 template<
typename T, qualifier Q>
44 inline length_t components(vec<2, T, Q>
const& v)
49 template<
typename T, qualifier Q>
50 inline length_t components(vec<3, T, Q>
const& v)
55 template<
typename T, qualifier Q>
56 inline length_t components(vec<4, T, Q>
const& v)
61 template<
typename genType>
62 inline length_t components(genType
const& m)
64 return m.length() * m[0].length();
67 template<
typename genType>
68 inline typename genType::value_type
const * begin(genType
const& v)
73 template<
typename genType>
74 inline typename genType::value_type
const * end(genType
const& v)
76 return begin(v) + components(v);
79 template<
typename genType>
80 inline typename genType::value_type * begin(genType& v)
85 template<
typename genType>
86 inline typename genType::value_type * end(genType& v)
88 return begin(v) + components(v);
91 # if GLM_COMPILER & GLM_COMPILER_VC