1.0.0 API documentation
ext/matrix_transform.hpp
Go to the documentation of this file.
1 
20 #pragma once
21 
22 // Dependencies
23 #include "../gtc/constants.hpp"
24 #include "../geometric.hpp"
25 #include "../trigonometric.hpp"
26 #include "../matrix.hpp"
27 
28 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
29 # pragma message("GLM: GLM_EXT_matrix_transform extension included")
30 #endif
31 
32 namespace glm
33 {
36 
38  template<typename genType>
39  GLM_FUNC_DECL GLM_CONSTEXPR genType identity();
40 
63  template<typename T, qualifier Q>
64  GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> translate(
65  mat<4, 4, T, Q> const& m, vec<3, T, Q> const& v);
66 
79  template<typename T, qualifier Q>
80  GLM_FUNC_DECL mat<4, 4, T, Q> rotate(
81  mat<4, 4, T, Q> const& m, T angle, vec<3, T, Q> const& axis);
82 
94  template<typename T, qualifier Q>
95  GLM_FUNC_DECL mat<4, 4, T, Q> scale(
96  mat<4, 4, T, Q> const& m, vec<3, T, Q> const& v);
97 
121  template <typename T, qualifier Q>
122  GLM_FUNC_QUALIFIER mat<4, 4, T, Q> shear(
123  mat<4, 4, T, Q> const &m, vec<3, T, Q> const& p, vec<2, T, Q> const &l_x, vec<2, T, Q> const &l_y, vec<2, T, Q> const &l_z);
124 
135  template<typename T, qualifier Q>
136  GLM_FUNC_DECL mat<4, 4, T, Q> lookAtRH(
137  vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up);
138 
149  template<typename T, qualifier Q>
150  GLM_FUNC_DECL mat<4, 4, T, Q> lookAtLH(
151  vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up);
152 
164  template<typename T, qualifier Q>
165  GLM_FUNC_DECL mat<4, 4, T, Q> lookAt(
166  vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up);
167 
169 }//namespace glm
170 
171 #include "matrix_transform.inl"
glm::angle
GLM_FUNC_DECL T angle(qua< T, Q > const &x)
Returns the quaternion rotation angle.
glm::identity
GLM_FUNC_DECL GLM_CONSTEXPR genType identity()
Builds an identity matrix.
glm::rotate
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::lookAt
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.
glm::scale
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::translate
GLM_FUNC_DECL GLM_CONSTEXPR 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::axis
GLM_FUNC_DECL vec< 3, T, Q > axis(qua< T, Q > const &x)
Returns the q rotation axis.
glm::lookAtLH
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.
glm::lookAtRH
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::shear
GLM_FUNC_QUALIFIER mat< 4, 4, T, Q > shear(mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &p, vec< 2, T, Q > const &l_x, vec< 2, T, Q > const &l_y, vec< 2, T, Q > const &l_z)
Builds a scale 4 * 4 matrix created from point referent 3 shearers.