16 #include "../detail/setup.hpp"
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_range is an experimetal extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
22 #if !GLM_HAS_RANGE_FOR
23 # error "GLM_GTX_range requires C++11 suppport or 'range for'"
26 #include "../gtc/type_ptr.hpp"
27 #include "../gtc/vec1.hpp"
34 template <
typename T, precision P>
35 inline length_t components(tvec1<T, P>
const & v)
40 template <
typename T, precision P>
41 inline length_t components(tvec2<T, P>
const & v)
46 template <
typename T, precision P>
47 inline length_t components(tvec3<T, P>
const & v)
52 template <
typename T, precision P>
53 inline length_t components(tvec4<T, P>
const & v)
58 template <
typename genType>
59 inline length_t components(genType
const & m)
61 return m.length() * m[0].length();
64 template <
typename genType>
65 inline typename genType::value_type
const * begin(genType
const & v)
70 template <
typename genType>
71 inline typename genType::value_type
const * end(genType
const & v)
73 return begin(v) + components(v);
76 template <
typename genType>
77 inline typename genType::value_type * begin(genType& v)
82 template <
typename genType>
83 inline typename genType::value_type * end(genType& v)
85 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.