16 #include "../detail/setup.hpp"
18 #if !GLM_HAS_RANGE_FOR
19 # error "GLM_GTX_range requires C++11 suppport or 'range for'"
22 #include "../gtc/type_ptr.hpp"
23 #include "../gtc/vec1.hpp"
30 template <
typename T, precision P>
31 inline length_t components(tvec1<T, P>
const & v)
36 template <
typename T, precision P>
37 inline length_t components(tvec2<T, P>
const & v)
42 template <
typename T, precision P>
43 inline length_t components(tvec3<T, P>
const & v)
48 template <
typename T, precision P>
49 inline length_t components(tvec4<T, P>
const & v)
54 template <
typename genType>
55 inline length_t components(genType
const & m)
57 return m.length() * m[0].length();
60 template <
typename genType>
61 inline typename genType::value_type
const * begin(genType
const & v)
66 template <
typename genType>
67 inline typename genType::value_type
const * end(genType
const & v)
69 return begin(v) + components(v);
72 template <
typename genType>
73 inline typename genType::value_type * begin(genType& v)
78 template <
typename genType>
79 inline typename genType::value_type * end(genType& v)
81 return begin(v) + components(v);
GLM_FUNC_DECL genType::value_type const * value_ptr(genType const &vec)
Return the constant address to the data of the input parameter.