| 1.0.2 API documentation

iteration.hpp
Go to the documentation of this file.
1
11 #pragma once
12
13 // Dependencies
14 #include "../detail/setup.hpp"
15 #include "../detail/qualifier.hpp"
16
17 #ifndef GLM_ENABLE_EXPERIMENTAL
18 # error "GLM: GLM_GTX_iteration 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."
19 #elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
20 # pragma message("GLM: GLM_GTX_iteration extension included")
21 #endif
22
23 #include <iterator>
24
25 namespace glm
26 {
29 template<length_t L,typename T,qualifier Q>
30 GLM_FUNC_DECL GLM_CONSTEXPR T* begin(vec<L, T, Q>& v);
31 template<length_t C,length_t R,typename T,qualifier Q>
32 GLM_FUNC_DECL GLM_CONSTEXPR T* begin(mat<C, R, T, Q>& m);
33 template<typename T,qualifier Q>
34 GLM_FUNC_DECL GLM_CONSTEXPR T* begin(qua<T, Q>& q);
35 template<length_t L,typename T,qualifier Q>
36 GLM_FUNC_DECL GLM_CONSTEXPR const T* begin(const vec<L, T, Q>& v);
37 template<length_t C,length_t R,typename T,qualifier Q>
38 GLM_FUNC_DECL GLM_CONSTEXPR const T* begin(const mat<C, R, T, Q>& m);
39 template<typename T,qualifier Q>
40 GLM_FUNC_DECL GLM_CONSTEXPR const T* begin(const qua<T, Q>& q);
41
42 template<length_t L,typename T,qualifier Q>
43 GLM_FUNC_DECL GLM_CONSTEXPR T* end(vec<L, T, Q>& v);
44 template<length_t C,length_t R,typename T,qualifier Q>
45 GLM_FUNC_DECL GLM_CONSTEXPR T* end(mat<C, R, T, Q>& m);
46 template<typename T,qualifier Q>
47 GLM_FUNC_DECL GLM_CONSTEXPR T* end(qua<T, Q>& q);
48 template<length_t L,typename T,qualifier Q>
49 GLM_FUNC_DECL GLM_CONSTEXPR const T* end(const vec<L, T, Q>& v);
50 template<length_t C,length_t R,typename T,qualifier Q>
51 GLM_FUNC_DECL GLM_CONSTEXPR const T* end(const mat<C, R, T, Q>& m);
52 template<typename T,qualifier Q>
53 GLM_FUNC_DECL GLM_CONSTEXPR const T* end(const qua<T, Q>& q);
54
55 // Reverse iteration
56 // rbegin,rend
57 template<length_t L,typename T,qualifier Q>
58 GLM_FUNC_DECL GLM_CONSTEXPR std::reverse_iterator<T*> rbegin(vec<L, T, Q>& v);
59 template<length_t C,length_t R,typename T,qualifier Q>
60 GLM_FUNC_DECL GLM_CONSTEXPR std::reverse_iterator<T*> rbegin(mat<C, R, T, Q>& m);
61 template<typename T,qualifier Q>
62 GLM_FUNC_DECL GLM_CONSTEXPR std::reverse_iterator<T*> rbegin(qua<T, Q>& q);
63 template<length_t L,typename T,qualifier Q>
64 GLM_FUNC_DECL GLM_CONSTEXPR std::reverse_iterator<const T*> rbegin(const vec<L, T, Q>& v);
65 template<length_t C,length_t R,typename T,qualifier Q>
66 GLM_FUNC_DECL GLM_CONSTEXPR std::reverse_iterator<const T*> rbegin(const mat<C, R, T, Q>& m);
67 template<typename T,qualifier Q>
68 GLM_FUNC_DECL GLM_CONSTEXPR std::reverse_iterator<const T*> rbegin(const qua<T, Q>& q);
69
70 template<length_t L,typename T,qualifier Q>
71 GLM_FUNC_DECL GLM_CONSTEXPR std::reverse_iterator<T*> rend(vec<L, T, Q>& v);
72 template<length_t C,length_t R,typename T,qualifier Q>
73 GLM_FUNC_DECL GLM_CONSTEXPR std::reverse_iterator<T*> rend(mat<C, R, T, Q>& m);
74 template<typename T,qualifier Q>
75 GLM_FUNC_DECL GLM_CONSTEXPR std::reverse_iterator<T*> rend(qua<T, Q>& q);
76 template<length_t L,typename T,qualifier Q>
77 GLM_FUNC_DECL GLM_CONSTEXPR std::reverse_iterator<const T*> rend(const vec<L, T, Q>& v);
78 template<length_t C,length_t R,typename T,qualifier Q>
79 GLM_FUNC_DECL GLM_CONSTEXPR std::reverse_iterator<const T*> rend(const mat<C, R, T, Q>& m);
80 template<typename T,qualifier Q>
81 GLM_FUNC_DECL GLM_CONSTEXPR std::reverse_iterator<const T*> rend(const qua<T, Q>& q);
82
83
85 }//namespace glm
86
87 #include "iteration.inl"