1.0.0 API documentation
Loading...
Searching...
No Matches
matrix_transform_2d.hpp
Go to the documentation of this file.
1
13
14#pragma once
15
16// Dependency:
17#include "../mat3x3.hpp"
18#include "../vec2.hpp"
19
20#ifndef GLM_ENABLE_EXPERIMENTAL
21# error "GLM: GLM_GTX_matrix_transform_2d is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
22#elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23# pragma message("GLM: GLM_GTX_matrix_transform_2d extension included")
24#endif
25
26namespace glm
27{
30
35 template<typename T, qualifier Q>
36 GLM_FUNC_QUALIFIER mat<3, 3, T, Q> translate(
37 mat<3, 3, T, Q> const& m,
38 vec<2, T, Q> const& v);
39
44 template<typename T, qualifier Q>
45 GLM_FUNC_QUALIFIER mat<3, 3, T, Q> rotate(
46 mat<3, 3, T, Q> const& m,
47 T angle);
48
53 template<typename T, qualifier Q>
54 GLM_FUNC_QUALIFIER mat<3, 3, T, Q> scale(
55 mat<3, 3, T, Q> const& m,
56 vec<2, T, Q> const& v);
57
62 template<typename T, qualifier Q>
63 GLM_FUNC_QUALIFIER mat<3, 3, T, Q> shearX(
64 mat<3, 3, T, Q> const& m,
65 T y);
66
71 template<typename T, qualifier Q>
72 GLM_FUNC_QUALIFIER mat<3, 3, T, Q> shearY(
73 mat<3, 3, T, Q> const& m,
74 T x);
75
77}//namespace glm
78
79#include "matrix_transform_2d.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 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 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_FUNC_DECL T angle(qua< T, Q > const &x)
Returns the quaternion rotation angle.
GLM_FUNC_QUALIFIER mat< 3, 3, T, Q > shearY(mat< 3, 3, T, Q > const &m, T x)
Builds a vertical (parallel to the y axis) shear 3 * 3 matrix.
GLM_FUNC_QUALIFIER mat< 3, 3, T, Q > shearX(mat< 3, 3, T, Q > const &m, T y)
Builds an horizontal (parallel to the x axis) shear 3 * 3 matrix.