0.9.9 API documentation
ext/matrix_transform.hpp
Go to the documentation of this file.
1 
19 #pragma once
20 
21 // Dependencies
22 #include "../gtc/constants.hpp"
23 #include "../geometric.hpp"
24 #include "../trigonometric.hpp"
25 #include "../matrix.hpp"
26 
27 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
28 # pragma message("GLM: GLM_EXT_matrix_transform extension included")
29 #endif
30 
31 namespace glm
32 {
35 
37  template<typename genType>
38  GLM_FUNC_DECL GLM_CONSTEXPR genType identity();
39 
59  template<typename T, qualifier Q>
60  GLM_FUNC_DECL mat<4, 4, T, Q> translate(
61  mat<4, 4, T, Q> const& m, vec<3, T, Q> const& v);
62 
73  template<typename T, qualifier Q>
74  GLM_FUNC_DECL mat<4, 4, T, Q> rotate(
75  mat<4, 4, T, Q> const& m, T angle, vec<3, T, Q> const& axis);
76 
86  template<typename T, qualifier Q>
87  GLM_FUNC_DECL mat<4, 4, T, Q> scale(
88  mat<4, 4, T, Q> const& m, vec<3, T, Q> const& v);
89 
97  template<typename T, qualifier Q>
98  GLM_FUNC_DECL mat<4, 4, T, Q> lookAtRH(
99  vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up);
100 
108  template<typename T, qualifier Q>
109  GLM_FUNC_DECL mat<4, 4, T, Q> lookAtLH(
110  vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up);
111 
120  template<typename T, qualifier Q>
121  GLM_FUNC_DECL mat<4, 4, T, Q> lookAt(
122  vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up);
123 
125 }//namespace glm
126 
127 #include "matrix_transform.inl"
GLM_FUNC_DECL mat< 4, 4, T, Q > rotate(mat< 4, 4, T, Q > const &m, T angle, vec< 3, T, Q > const &axis)
Builds a rotation 4 * 4 matrix created from an axis vector and an angle.
GLM_FUNC_DECL vec< 3, T, Q > axis(qua< T, Q > const &x)
Returns the q rotation axis.
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAtRH(vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
Build a right handed look at view matrix.
GLM_FUNC_DECL mat< 4, 4, T, Q > translate(mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)
Builds a translation 4 * 4 matrix created from a vector of 3 components.
GLM_FUNC_DECL T angle(qua< T, Q > const &x)
Returns the quaternion rotation angle.
GLM_FUNC_DECL GLM_CONSTEXPR genType identity()
Builds an identity matrix.
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAt(vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
Build a look at view matrix based on the default handedness.
Definition: common.hpp:18
GLM_FUNC_DECL mat< 4, 4, T, Q > scale(mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)
Builds a scale 4 * 4 matrix created from 3 scalars.
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAtLH(vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
Build a left handed look at view matrix.