|
|
@@ -294,6 +294,151 @@ namespace glm
|
|
|
return &(mat[0].x);
|
|
|
}
|
|
|
|
|
|
+ //! Build a vector from a pointer.
|
|
|
+ //! From GLM_GTC_type_ptr extension.
|
|
|
+ template<typename T>
|
|
|
+ inline detail::tvec2<T> make_vec2(T const * const ptr)
|
|
|
+ {
|
|
|
+ detail::tvec2<T> Result;
|
|
|
+ memcpy(value_ptr(Result), ptr, sizeof(detail::tvec2<T>));
|
|
|
+ return Result;
|
|
|
+ }
|
|
|
+
|
|
|
+ //! Build a vector from a pointer.
|
|
|
+ //! From GLM_GTC_type_ptr extension.
|
|
|
+ template<typename T>
|
|
|
+ inline detail::tvec3<T> make_vec3(T const * const ptr)
|
|
|
+ {
|
|
|
+ detail::tvec3<T> Result;
|
|
|
+ memcpy(value_ptr(Result), ptr, sizeof(detail::tvec3<T>));
|
|
|
+ return Result;
|
|
|
+ }
|
|
|
+
|
|
|
+ //! Build a vector from a pointer.
|
|
|
+ //! From GLM_GTC_type_ptr extension.
|
|
|
+ template<typename T>
|
|
|
+ inline detail::tvec4<T> make_vec4(T const * const ptr)
|
|
|
+ {
|
|
|
+ detail::tvec4<T> Result;
|
|
|
+ memcpy(value_ptr(Result), ptr, sizeof(detail::tvec4<T>));
|
|
|
+ return Result;
|
|
|
+ }
|
|
|
+
|
|
|
+ //! Build a matrix from a pointer.
|
|
|
+ //! From GLM_GTC_type_ptr extension.
|
|
|
+ template<typename T>
|
|
|
+ inline detail::tmat2x2<T> make_mat2x2(T const * const ptr)
|
|
|
+ {
|
|
|
+ detail::tmat2x2<T> Result;
|
|
|
+ memcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x2<T>));
|
|
|
+ return Result;
|
|
|
+ }
|
|
|
+
|
|
|
+ //! Build a matrix from a pointer.
|
|
|
+ //! From GLM_GTC_type_ptr extension.
|
|
|
+ template<typename T>
|
|
|
+ inline detail::tmat2x3<T> make_mat2x3(T const * const ptr)
|
|
|
+ {
|
|
|
+ detail::tmat2x3<T> Result;
|
|
|
+ memcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x3<T>));
|
|
|
+ return Result;
|
|
|
+ }
|
|
|
+
|
|
|
+ //! Build a matrix from a pointer.
|
|
|
+ //! From GLM_GTC_type_ptr extension.
|
|
|
+ template<typename T>
|
|
|
+ inline detail::tmat2x4<T> make_mat2x4(T const * const ptr)
|
|
|
+ {
|
|
|
+ detail::tmat2x4<T> Result;
|
|
|
+ memcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x4<T>));
|
|
|
+ return Result;
|
|
|
+ }
|
|
|
+
|
|
|
+ //! Build a matrix from a pointer.
|
|
|
+ //! From GLM_GTC_type_ptr extension.
|
|
|
+ template<typename T>
|
|
|
+ inline detail::tmat3x2<T> make_mat3x2(T const * const ptr)
|
|
|
+ {
|
|
|
+ detail::tmat3x2<T> Result;
|
|
|
+ memcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x2<T>));
|
|
|
+ return Result;
|
|
|
+ }
|
|
|
+
|
|
|
+ //! Build a matrix from a pointer.
|
|
|
+ //! From GLM_GTC_type_ptr extension.
|
|
|
+ template<typename T>
|
|
|
+ inline detail::tmat3x3<T> make_mat3x3(T const * const ptr)
|
|
|
+ {
|
|
|
+ detail::tmat3x3<T> Result;
|
|
|
+ memcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x3<T>));
|
|
|
+ return Result;
|
|
|
+ }
|
|
|
+
|
|
|
+ //! Build a matrix from a pointer.
|
|
|
+ //! From GLM_GTC_type_ptr extension.
|
|
|
+ template<typename T>
|
|
|
+ inline detail::tmat3x4<T> make_mat3x4(T const * const ptr)
|
|
|
+ {
|
|
|
+ detail::tmat3x4<T> Result;
|
|
|
+ memcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x4<T>));
|
|
|
+ return Result;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ //! Build a matrix from a pointer.
|
|
|
+ //! From GLM_GTC_type_ptr extension.
|
|
|
+ template<typename T>
|
|
|
+ inline detail::tmat4x2<T> make_mat4x2(T const * const ptr)
|
|
|
+ {
|
|
|
+ detail::tmat4x2<T> Result;
|
|
|
+ memcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x2<T>));
|
|
|
+ return Result;
|
|
|
+ }
|
|
|
+
|
|
|
+ //! Build a matrix from a pointer.
|
|
|
+ //! From GLM_GTC_type_ptr extension.
|
|
|
+ template<typename T>
|
|
|
+ inline detail::tmat4x3<T> make_mat4x3(T const * const ptr)
|
|
|
+ {
|
|
|
+ detail::tmat4x3<T> Result;
|
|
|
+ memcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x3<T>));
|
|
|
+ return Result;
|
|
|
+ }
|
|
|
+
|
|
|
+ //! Build a matrix from a pointer.
|
|
|
+ //! From GLM_GTC_type_ptr extension.
|
|
|
+ template<typename T>
|
|
|
+ inline detail::tmat4x4<T> make_mat4x4(T const * const ptr)
|
|
|
+ {
|
|
|
+ detail::tmat4x4<T> Result;
|
|
|
+ memcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x4<T>));
|
|
|
+ return Result;
|
|
|
+ }
|
|
|
+
|
|
|
+ //! Build a matrix from a pointer.
|
|
|
+ //! From GLM_GTC_type_ptr extension.
|
|
|
+ template<typename T>
|
|
|
+ inline detail::tmat2x2<T> make_mat2(T const * const ptr)
|
|
|
+ {
|
|
|
+ return make_mat2x2(Result);
|
|
|
+ }
|
|
|
+
|
|
|
+ //! Build a matrix from a pointer.
|
|
|
+ //! From GLM_GTC_type_ptr extension.
|
|
|
+ template<typename T>
|
|
|
+ inline detail::tmat3<T> make_mat3(T const * const ptr)
|
|
|
+ {
|
|
|
+ return make_mat3x3(Result);
|
|
|
+ }
|
|
|
+
|
|
|
+ //! Build a matrix from a pointer.
|
|
|
+ //! From GLM_GTC_type_ptr extension.
|
|
|
+ template<typename T>
|
|
|
+ inline detail::tmat4<T> make_mat4(T const * const ptr)
|
|
|
+ {
|
|
|
+ return make_mat4x4(Result);
|
|
|
+ }
|
|
|
+
|
|
|
///@}
|
|
|
|
|
|
}//namespace type_ptr
|