| 0.9.9 API documenation

type_ptr.hpp
Go to the documentation of this file.
1
34 #pragma once
35
36 // Dependency:
37 #include "../gtc/quaternion.hpp"
38 #include "../gtc/vec1.hpp"
39 #include "../vec2.hpp"
40 #include "../vec3.hpp"
41 #include "../vec4.hpp"
42 #include "../mat2x2.hpp"
43 #include "../mat2x3.hpp"
44 #include "../mat2x4.hpp"
45 #include "../mat3x2.hpp"
46 #include "../mat3x3.hpp"
47 #include "../mat3x4.hpp"
48 #include "../mat4x2.hpp"
49 #include "../mat4x3.hpp"
50 #include "../mat4x4.hpp"
51 #include <cstring>
52
53 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
54 # pragma message("GLM: GLM_GTC_type_ptr extension included")
55 #endif
56
57 namespace glm
58 {
61
64 template<typename genType>
65 GLM_FUNC_DECL typename genType::value_type const * value_ptr(genType const& v);
66
69 template <typename T, qualifier Q>
70 GLM_FUNC_DECL vec<1, T, Q> make_vec1(vec<1, T, Q> const& v);
71
74 template <typename T, qualifier Q>
75 GLM_FUNC_DECL vec<1, T, Q> make_vec1(vec<2, T, Q> const& v);
76
79 template <typename T, qualifier Q>
80 GLM_FUNC_DECL vec<1, T, Q> make_vec1(vec<3, T, Q> const& v);
81
84 template <typename T, qualifier Q>
85 GLM_FUNC_DECL vec<1, T, Q> make_vec1(vec<4, T, Q> const& v);
86
89 template <typename T, qualifier Q>
90 GLM_FUNC_DECL vec<2, T, Q> make_vec2(vec<1, T, Q> const& v);
91
94 template <typename T, qualifier Q>
95 GLM_FUNC_DECL vec<2, T, Q> make_vec2(vec<2, T, Q> const& v);
96
99 template <typename T, qualifier Q>
100 GLM_FUNC_DECL vec<2, T, Q> make_vec2(vec<3, T, Q> const& v);
101
104 template <typename T, qualifier Q>
105 GLM_FUNC_DECL vec<2, T, Q> make_vec2(vec<4, T, Q> const& v);
106
109 template <typename T, qualifier Q>
110 GLM_FUNC_DECL vec<3, T, Q> make_vec3(vec<1, T, Q> const& v);
111
114 template <typename T, qualifier Q>
115 GLM_FUNC_DECL vec<3, T, Q> make_vec3(vec<2, T, Q> const& v);
116
119 template <typename T, qualifier Q>
120 GLM_FUNC_DECL vec<3, T, Q> make_vec3(vec<3, T, Q> const& v);
121
124 template <typename T, qualifier Q>
125 GLM_FUNC_DECL vec<3, T, Q> make_vec3(vec<4, T, Q> const& v);
126
129 template <typename T, qualifier Q>
130 GLM_FUNC_DECL vec<4, T, Q> make_vec4(vec<1, T, Q> const& v);
131
134 template <typename T, qualifier Q>
135 GLM_FUNC_DECL vec<4, T, Q> make_vec4(vec<2, T, Q> const& v);
136
139 template <typename T, qualifier Q>
140 GLM_FUNC_DECL vec<4, T, Q> make_vec4(vec<3, T, Q> const& v);
141
144 template <typename T, qualifier Q>
145 GLM_FUNC_DECL vec<4, T, Q> make_vec4(vec<4, T, Q> const& v);
146
149 template<typename T>
150 GLM_FUNC_DECL vec<2, T, defaultp> make_vec2(T const * const ptr);
151
154 template<typename T>
155 GLM_FUNC_DECL vec<3, T, defaultp> make_vec3(T const * const ptr);
156
159 template<typename T>
160 GLM_FUNC_DECL vec<4, T, defaultp> make_vec4(T const * const ptr);
161
164 template<typename T>
165 GLM_FUNC_DECL mat<2, 2, T, defaultp> make_mat2x2(T const * const ptr);
166
169 template<typename T>
170 GLM_FUNC_DECL mat<2, 3, T, defaultp> make_mat2x3(T const * const ptr);
171
174 template<typename T>
175 GLM_FUNC_DECL mat<2, 4, T, defaultp> make_mat2x4(T const * const ptr);
176
179 template<typename T>
180 GLM_FUNC_DECL mat<3, 2, T, defaultp> make_mat3x2(T const * const ptr);
181
184 template<typename T>
185 GLM_FUNC_DECL mat<3, 3, T, defaultp> make_mat3x3(T const * const ptr);
186
189 template<typename T>
190 GLM_FUNC_DECL mat<3, 4, T, defaultp> make_mat3x4(T const * const ptr);
191
194 template<typename T>
195 GLM_FUNC_DECL mat<4, 2, T, defaultp> make_mat4x2(T const * const ptr);
196
199 template<typename T>
200 GLM_FUNC_DECL mat<4, 3, T, defaultp> make_mat4x3(T const * const ptr);
201
204 template<typename T>
205 GLM_FUNC_DECL mat<4, 4, T, defaultp> make_mat4x4(T const * const ptr);
206
209 template<typename T>
210 GLM_FUNC_DECL mat<2, 2, T, defaultp> make_mat2(T const * const ptr);
211
214 template<typename T>
215 GLM_FUNC_DECL mat<3, 3, T, defaultp> make_mat3(T const * const ptr);
216
219 template<typename T>
220 GLM_FUNC_DECL mat<4, 4, T, defaultp> make_mat4(T const * const ptr);
221
224 template<typename T>
225 GLM_FUNC_DECL qua<T, defaultp> make_quat(T const * const ptr);
226
228 }//namespace glm
229
230 #include "type_ptr.inl"
glm::make_mat4x4
GLM_FUNC_DECL mat< 4, 4, T, defaultp > make_mat4x4(T const *const ptr)
Build a matrix from a pointer.
glm::value_ptr
GLM_FUNC_DECL genType::value_type const * value_ptr(genType const &v)
Return the constant address to the data of the input parameter.
glm::make_mat2
GLM_FUNC_DECL mat< 2, 2, T, defaultp > make_mat2(T const *const ptr)
Build a matrix from a pointer.
glm::make_mat3
GLM_FUNC_DECL mat< 3, 3, T, defaultp > make_mat3(T const *const ptr)
Build a matrix from a pointer.
glm::make_mat2x2
GLM_FUNC_DECL mat< 2, 2, T, defaultp > make_mat2x2(T const *const ptr)
Build a matrix from a pointer.
glm::make_vec1
GLM_FUNC_DECL vec< 1, T, Q > make_vec1(vec< 4, T, Q > const &v)
Build a vector from a pointer.
glm::make_mat2x4
GLM_FUNC_DECL mat< 2, 4, T, defaultp > make_mat2x4(T const *const ptr)
Build a matrix from a pointer.
glm::make_mat3x4
GLM_FUNC_DECL mat< 3, 4, T, defaultp > make_mat3x4(T const *const ptr)
Build a matrix from a pointer.
glm::make_mat4
GLM_FUNC_DECL mat< 4, 4, T, defaultp > make_mat4(T const *const ptr)
Build a matrix from a pointer.
glm::make_vec4
GLM_FUNC_DECL vec< 4, T, defaultp > make_vec4(T const *const ptr)
Build a vector from a pointer.
glm::make_mat4x2
GLM_FUNC_DECL mat< 4, 2, T, defaultp > make_mat4x2(T const *const ptr)
Build a matrix from a pointer.
glm::make_mat3x3
GLM_FUNC_DECL mat< 3, 3, T, defaultp > make_mat3x3(T const *const ptr)
Build a matrix from a pointer.
glm::make_quat
GLM_FUNC_DECL qua< T, defaultp > make_quat(T const *const ptr)
Build a quaternion from a pointer.
glm::make_vec2
GLM_FUNC_DECL vec< 2, T, defaultp > make_vec2(T const *const ptr)
Build a vector from a pointer.
glm::make_vec3
GLM_FUNC_DECL vec< 3, T, defaultp > make_vec3(T const *const ptr)
Build a vector from a pointer.
glm
Definition: common.hpp:20
glm::make_mat2x3
GLM_FUNC_DECL mat< 2, 3, T, defaultp > make_mat2x3(T const *const ptr)
Build a matrix from a pointer.
glm::make_mat4x3
GLM_FUNC_DECL mat< 4, 3, T, defaultp > make_mat4x3(T const *const ptr)
Build a matrix from a pointer.
glm::make_mat3x2
GLM_FUNC_DECL mat< 3, 2, T, defaultp > make_mat3x2(T const *const ptr)
Build a matrix from a pointer.