0.9.9 API documenation

- Main Page
- Modules
- Files

- File List

transform2.hpp
Go to the documentation of this file.
1
14 #pragma once
15
16 // Dependency:
17 #include "../glm.hpp"
18 #include "../gtx/transform.hpp"
19
20 #ifndef GLM_ENABLE_EXPERIMENTAL
21 # error "GLM: GLM_GTX_transform2 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 #endif
23
24 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTX_transform2 extension included")
26 #endif
27
28 namespace glm
29 {
32
35 template<typename T, qualifier P>
36 GLM_FUNC_DECL mat<3, 3, T, P> shearX2D(
37 mat<3, 3, T, P> const& m,
38 T y);
39
42 template<typename T, qualifier P>
43 GLM_FUNC_DECL mat<3, 3, T, P> shearY2D(
44 mat<3, 3, T, P> const& m,
45 T x);
46
49 template<typename T, qualifier P>
50 GLM_FUNC_DECL mat<4, 4, T, P> shearX3D(
51 const mat<4, 4, T, P> & m,
52 T y,
53 T z);
54
57 template<typename T, qualifier P>
58 GLM_FUNC_DECL mat<4, 4, T, P> shearY3D(
59 const mat<4, 4, T, P> & m,
60 T x,
61 T z);
62
65 template<typename T, qualifier P>
66 GLM_FUNC_DECL mat<4, 4, T, P> shearZ3D(
67 const mat<4, 4, T, P> & m,
68 T x,
69 T y);
70
71 //template<typename T> GLM_FUNC_QUALIFIER mat<4, 4, T, P> shear(const mat<4, 4, T, P> & m, shearPlane, planePoint, angle)
72 // Identity + tan(angle) * cross(Normal, OnPlaneVector) 0
73 // - dot(PointOnPlane, normal) * OnPlaneVector 1
74
75 // Reflect functions seem to don't work
76 //template<typename T> mat<3, 3, T, P> reflect2D(const mat<3, 3, T, P> & m, const vec<3, T, P>& normal){return reflect2DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
77 //template<typename T> mat<4, 4, T, P> reflect3D(const mat<4, 4, T, P> & m, const vec<3, T, P>& normal){return reflect3DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
78
81 template<typename T, qualifier P>
82 GLM_FUNC_DECL mat<3, 3, T, P> proj2D(
83 const mat<3, 3, T, P> & m,
84 const vec<3, T, P>& normal);
85
88 template<typename T, qualifier P>
89 GLM_FUNC_DECL mat<4, 4, T, P> proj3D(
90 const mat<4, 4, T, P> & m,
91 const vec<3, T, P>& normal);
92
95 template<typename valType, qualifier P>
96 GLM_FUNC_DECL mat<4, 4, valType, P> scaleBias(
97 valType scale,
98 valType bias);
99
102 template<typename valType, qualifier P>
103 GLM_FUNC_DECL mat<4, 4, valType, P> scaleBias(
104 mat<4, 4, valType, P> const & m,
105 valType scale,
106 valType bias);
107
109 }// namespace glm
110
111 #include "transform2.inl"
glm::shearY2D
GLM_FUNC_DECL mat< 3, 3, T, P > shearY2D(mat< 3, 3, T, P > const &m, T x)
Transforms a matrix with a shearing on Y axis.
glm::shearY3D
GLM_FUNC_DECL mat< 4, 4, T, P > shearY3D(const mat< 4, 4, T, P > &m, T x, T z)
Transforms a matrix with a shearing on Y axis.
glm::shearZ3D
GLM_FUNC_DECL mat< 4, 4, T, P > shearZ3D(const mat< 4, 4, T, P > &m, T x, T y)
Transforms a matrix with a shearing on Z axis.
glm
Definition: _noise.hpp:11
glm::shearX3D
GLM_FUNC_DECL mat< 4, 4, T, P > shearX3D(const mat< 4, 4, T, P > &m, T y, T z)
Transforms a matrix with a shearing on X axis From GLM_GTX_transform2 extension.
glm::shearX2D
GLM_FUNC_DECL mat< 3, 3, T, P > shearX2D(mat< 3, 3, T, P > const &m, T y)
Transforms a matrix with a shearing on X axis.
glm::proj2D
GLM_FUNC_DECL mat< 3, 3, T, P > proj2D(const mat< 3, 3, T, P > &m, const vec< 3, T, P > &normal)
Build planar projection matrix along normal axis.
glm::scaleBias
GLM_FUNC_DECL mat< 4, 4, valType, P > scaleBias(mat< 4, 4, valType, P > const &m, valType scale, valType bias)
Build a scale bias matrix.
glm::scale
GLM_FUNC_DECL mat< 4, 4, T, P > scale(mat< 4, 4, T, P > const &m, vec< 3, T, P > const &v)
Builds a scale 4 * 4 matrix created from 3 scalars.
glm::proj3D
GLM_FUNC_DECL mat< 4, 4, T, P > proj3D(const mat< 4, 4, T, P > &m, const vec< 3, T, P > &normal)
Build planar projection matrix along normal axis.