1.0.2 API documentation: transform2.hpp Source File

| 1.0.2 API documentation

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 #elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_transform2 extension included")
24 #endif
25
26 namespace glm
27 {
30
33 template<typename T, qualifier Q>
34 GLM_FUNC_DECL mat<3, 3, T, Q> shearX2D(mat<3, 3, T, Q> const& m, T y);
35
38 template<typename T, qualifier Q>
39 GLM_FUNC_DECL mat<3, 3, T, Q> shearY2D(mat<3, 3, T, Q> const& m, T x);
40
43 template<typename T, qualifier Q>
44 GLM_FUNC_DECL mat<4, 4, T, Q> shearX3D(mat<4, 4, T, Q> const& m, T y, T z);
45
48 template<typename T, qualifier Q>
49 GLM_FUNC_DECL mat<4, 4, T, Q> shearY3D(mat<4, 4, T, Q> const& m, T x, T z);
50
53 template<typename T, qualifier Q>
54 GLM_FUNC_DECL mat<4, 4, T, Q> shearZ3D(mat<4, 4, T, Q> const& m, T x, T y);
55
56 //template<typename T> GLM_FUNC_QUALIFIER mat<4, 4, T, Q> shear(const mat<4, 4, T, Q> & m, shearPlane, planePoint, angle)
57 // Identity + tan(angle) * cross(Normal, OnPlaneVector) 0
58 // - dot(PointOnPlane, normal) * OnPlaneVector 1
59
60 // Reflect functions seem to don't work
61 //template<typename T> mat<3, 3, T, Q> reflect2D(const mat<3, 3, T, Q> & m, const vec<3, T, Q>& normal){return reflect2DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
62 //template<typename T> mat<4, 4, T, Q> reflect3D(const mat<4, 4, T, Q> & m, const vec<3, T, Q>& normal){return reflect3DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
63
66 template<typename T, qualifier Q>
67 GLM_FUNC_DECL mat<3, 3, T, Q> proj2D(mat<3, 3, T, Q> const& m, vec<3, T, Q> const& normal);
68
71 template<typename T, qualifier Q>
72 GLM_FUNC_DECL mat<4, 4, T, Q> proj3D(mat<4, 4, T, Q> const & m, vec<3, T, Q> const& normal);
73
76 template<typename T, qualifier Q>
77 GLM_FUNC_DECL mat<4, 4, T, Q> scaleBias(T scale, T bias);
78
81 template<typename T, qualifier Q>
82 GLM_FUNC_DECL mat<4, 4, T, Q> scaleBias(mat<4, 4, T, Q> const& m, T scale, T bias);
83
85 }// namespace glm
86
87 #include "transform2.inl"
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::proj3D
GLM_FUNC_DECL mat< 4, 4, T, Q > proj3D(mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &normal)
Build planar projection matrix along normal axis.
glm::shearX2D
GLM_FUNC_DECL mat< 3, 3, T, Q > shearX2D(mat< 3, 3, T, Q > const &m, T y)
Transforms a matrix with a shearing on X axis.
glm::shearY2D
GLM_FUNC_DECL mat< 3, 3, T, Q > shearY2D(mat< 3, 3, T, Q > const &m, T x)
Transforms a matrix with a shearing on Y axis.
glm::shearX3D
GLM_FUNC_DECL mat< 4, 4, T, Q > shearX3D(mat< 4, 4, T, Q > const &m, T y, T z)
Transforms a matrix with a shearing on X axis From GLM_GTX_transform2 extension.
glm::proj2D
GLM_FUNC_DECL mat< 3, 3, T, Q > proj2D(mat< 3, 3, T, Q > const &m, vec< 3, T, Q > const &normal)
Build planar projection matrix along normal axis.
glm::scaleBias
GLM_FUNC_DECL mat< 4, 4, T, Q > scaleBias(mat< 4, 4, T, Q > const &m, T scale, T bias)
Build a scale bias matrix.
glm::shearZ3D
GLM_FUNC_DECL mat< 4, 4, T, Q > shearZ3D(mat< 4, 4, T, Q > const &m, T x, T y)
Transforms a matrix with a shearing on Z axis.
glm::shearY3D
GLM_FUNC_DECL mat< 4, 4, T, Q > shearY3D(mat< 4, 4, T, Q > const &m, T x, T z)
Transforms a matrix with a shearing on Y axis.