0.9.9 API documenation
type_ptr.hpp
Go to the documentation of this file.
1 
35 #pragma once
36 
37 // Dependency:
38 #include "../gtc/quaternion.hpp"
39 #include "../gtc/vec1.hpp"
40 #include "../vec2.hpp"
41 #include "../vec3.hpp"
42 #include "../vec4.hpp"
43 #include "../mat2x2.hpp"
44 #include "../mat2x3.hpp"
45 #include "../mat2x4.hpp"
46 #include "../mat3x2.hpp"
47 #include "../mat3x3.hpp"
48 #include "../mat3x4.hpp"
49 #include "../mat4x2.hpp"
50 #include "../mat4x3.hpp"
51 #include "../mat4x4.hpp"
52 #include <cstring>
53 
54 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
55 # pragma message("GLM: GLM_GTC_type_ptr extension included")
56 #endif
57 
58 namespace glm
59 {
62 
65  template<typename genType>
66  GLM_FUNC_DECL typename genType::value_type const * value_ptr(genType const& v);
67 
70  template <typename T, qualifier Q>
71  GLM_FUNC_DECL vec<1, T, Q> make_vec1(vec<1, T, Q> const& v);
72 
75  template <typename T, qualifier Q>
76  GLM_FUNC_DECL vec<1, T, Q> make_vec1(vec<2, T, Q> const& v);
77 
80  template <typename T, qualifier Q>
81  GLM_FUNC_DECL vec<1, T, Q> make_vec1(vec<3, T, Q> const& v);
82 
85  template <typename T, qualifier Q>
86  GLM_FUNC_DECL vec<1, T, Q> make_vec1(vec<4, T, Q> const& v);
87 
90  template <typename T, qualifier Q>
91  GLM_FUNC_DECL vec<2, T, Q> make_vec2(vec<1, T, Q> const& v);
92 
95  template <typename T, qualifier Q>
96  GLM_FUNC_DECL vec<2, T, Q> make_vec2(vec<2, T, Q> const& v);
97 
100  template <typename T, qualifier Q>
101  GLM_FUNC_DECL vec<2, T, Q> make_vec2(vec<3, T, Q> const& v);
102 
105  template <typename T, qualifier Q>
106  GLM_FUNC_DECL vec<2, T, Q> make_vec2(vec<4, T, Q> const& v);
107 
110  template <typename T, qualifier Q>
111  GLM_FUNC_DECL vec<3, T, Q> make_vec3(vec<1, T, Q> const& v);
112 
115  template <typename T, qualifier Q>
116  GLM_FUNC_DECL vec<3, T, Q> make_vec3(vec<2, T, Q> const& v);
117 
120  template <typename T, qualifier Q>
121  GLM_FUNC_DECL vec<3, T, Q> make_vec3(vec<3, T, Q> const& v);
122 
125  template <typename T, qualifier Q>
126  GLM_FUNC_DECL vec<3, T, Q> make_vec3(vec<4, T, Q> const& v);
127 
130  template <typename T, qualifier Q>
131  GLM_FUNC_DECL vec<4, T, Q> make_vec4(vec<1, T, Q> const& v);
132 
135  template <typename T, qualifier Q>
136  GLM_FUNC_DECL vec<4, T, Q> make_vec4(vec<2, T, Q> const& v);
137 
140  template <typename T, qualifier Q>
141  GLM_FUNC_DECL vec<4, T, Q> make_vec4(vec<3, T, Q> const& v);
142 
145  template <typename T, qualifier Q>
146  GLM_FUNC_DECL vec<4, T, Q> make_vec4(vec<4, T, Q> const& v);
147 
150  template<typename T>
151  GLM_FUNC_DECL vec<2, T, defaultp> make_vec2(T const * const ptr);
152 
155  template<typename T>
156  GLM_FUNC_DECL vec<3, T, defaultp> make_vec3(T const * const ptr);
157 
160  template<typename T>
161  GLM_FUNC_DECL vec<4, T, defaultp> make_vec4(T const * const ptr);
162 
165  template<typename T>
166  GLM_FUNC_DECL mat<2, 2, T, defaultp> make_mat2x2(T const * const ptr);
167 
170  template<typename T>
171  GLM_FUNC_DECL mat<2, 3, T, defaultp> make_mat2x3(T const * const ptr);
172 
175  template<typename T>
176  GLM_FUNC_DECL mat<2, 4, T, defaultp> make_mat2x4(T const * const ptr);
177 
180  template<typename T>
181  GLM_FUNC_DECL mat<3, 2, T, defaultp> make_mat3x2(T const * const ptr);
182 
185  template<typename T>
186  GLM_FUNC_DECL mat<3, 3, T, defaultp> make_mat3x3(T const * const ptr);
187 
190  template<typename T>
191  GLM_FUNC_DECL mat<3, 4, T, defaultp> make_mat3x4(T const * const ptr);
192 
195  template<typename T>
196  GLM_FUNC_DECL mat<4, 2, T, defaultp> make_mat4x2(T const * const ptr);
197 
200  template<typename T>
201  GLM_FUNC_DECL mat<4, 3, T, defaultp> make_mat4x3(T const * const ptr);
202 
205  template<typename T>
206  GLM_FUNC_DECL mat<4, 4, T, defaultp> make_mat4x4(T const * const ptr);
207 
210  template<typename T>
211  GLM_FUNC_DECL mat<2, 2, T, defaultp> make_mat2(T const * const ptr);
212 
215  template<typename T>
216  GLM_FUNC_DECL mat<3, 3, T, defaultp> make_mat3(T const * const ptr);
217 
220  template<typename T>
221  GLM_FUNC_DECL mat<4, 4, T, defaultp> make_mat4(T const * const ptr);
222 
225  template<typename T>
226  GLM_FUNC_DECL tquat<T, defaultp> make_quat(T const * const ptr);
227 
229 }//namespace glm
230 
231 #include "type_ptr.inl"
GLM_FUNC_DECL mat< 4, 4, T, defaultp > make_mat4x4(T const *const ptr)
Build a matrix from a pointer.
GLM_FUNC_DECL mat< 4, 3, T, defaultp > make_mat4x3(T const *const ptr)
Build a matrix from a pointer.
GLM_FUNC_DECL genType::value_type const * value_ptr(genType const &v)
Return the constant address to the data of the input parameter.
GLM_FUNC_DECL mat< 3, 3, T, defaultp > make_mat3x3(T const *const ptr)
Build a matrix from a pointer.
GLM_FUNC_DECL mat< 2, 2, T, defaultp > make_mat2(T const *const ptr)
Build a matrix from a pointer.
GLM_FUNC_DECL vec< 4, T, defaultp > make_vec4(T const *const ptr)
Build a vector from a pointer.
Definition: common.hpp:20
GLM_FUNC_DECL vec< 3, T, defaultp > make_vec3(T const *const ptr)
Build a vector from a pointer.
GLM_FUNC_DECL mat< 3, 4, T, defaultp > make_mat3x4(T const *const ptr)
Build a matrix from a pointer.
GLM_FUNC_DECL tquat< T, defaultp > make_quat(T const *const ptr)
Build a quaternion from a pointer.
GLM_FUNC_DECL mat< 3, 2, T, defaultp > make_mat3x2(T const *const ptr)
Build a matrix from a pointer.
GLM_FUNC_DECL mat< 2, 2, T, defaultp > make_mat2x2(T const *const ptr)
Build a matrix from a pointer.
GLM_FUNC_DECL mat< 3, 3, T, defaultp > make_mat3(T const *const ptr)
Build a matrix from a pointer.
GLM_FUNC_DECL mat< 4, 2, T, defaultp > make_mat4x2(T const *const ptr)
Build a matrix from a pointer.
GLM_FUNC_DECL vec< 2, T, defaultp > make_vec2(T const *const ptr)
Build a vector from a pointer.
GLM_FUNC_DECL mat< 2, 4, T, defaultp > make_mat2x4(T const *const ptr)
Build a matrix from a pointer.
GLM_FUNC_DECL vec< 1, T, Q > make_vec1(vec< 4, T, Q > const &v)
Build a vector from a pointer.
GLM_FUNC_DECL mat< 2, 3, T, defaultp > make_mat2x3(T const *const ptr)
Build a matrix from a pointer.
GLM_FUNC_DECL mat< 4, 4, T, defaultp > make_mat4(T const *const ptr)
Build a matrix from a pointer.