0.9.8
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 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
21 # pragma message("GLM: GLM_GTX_transform2 extension included")
22 #endif
23 
24 namespace glm
25 {
28 
31  template <typename T, precision P>
32  GLM_FUNC_DECL tmat3x3<T, P> shearX2D(
33  tmat3x3<T, P> const & m,
34  T y);
35 
38  template <typename T, precision P>
39  GLM_FUNC_DECL tmat3x3<T, P> shearY2D(
40  tmat3x3<T, P> const & m,
41  T x);
42 
45  template <typename T, precision P>
46  GLM_FUNC_DECL tmat4x4<T, P> shearX3D(
47  const tmat4x4<T, P> & m,
48  T y,
49  T z);
50 
53  template <typename T, precision P>
54  GLM_FUNC_DECL tmat4x4<T, P> shearY3D(
55  const tmat4x4<T, P> & m,
56  T x,
57  T z);
58 
61  template <typename T, precision P>
62  GLM_FUNC_DECL tmat4x4<T, P> shearZ3D(
63  const tmat4x4<T, P> & m,
64  T x,
65  T y);
66 
67  //template <typename T> GLM_FUNC_QUALIFIER tmat4x4<T, P> shear(const tmat4x4<T, P> & m, shearPlane, planePoint, angle)
68  // Identity + tan(angle) * cross(Normal, OnPlaneVector) 0
69  // - dot(PointOnPlane, normal) * OnPlaneVector 1
70 
71  // Reflect functions seem to don't work
72  //template <typename T> tmat3x3<T, P> reflect2D(const tmat3x3<T, P> & m, const tvec3<T, P>& normal){return reflect2DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
73  //template <typename T> tmat4x4<T, P> reflect3D(const tmat4x4<T, P> & m, const tvec3<T, P>& normal){return reflect3DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
74 
77  template <typename T, precision P>
78  GLM_FUNC_DECL tmat3x3<T, P> proj2D(
79  const tmat3x3<T, P> & m,
80  const tvec3<T, P>& normal);
81 
84  template <typename T, precision P>
85  GLM_FUNC_DECL tmat4x4<T, P> proj3D(
86  const tmat4x4<T, P> & m,
87  const tvec3<T, P>& normal);
88 
91  template <typename valType, precision P>
92  GLM_FUNC_DECL tmat4x4<valType, P> scaleBias(
93  valType scale,
94  valType bias);
95 
98  template <typename valType, precision P>
99  GLM_FUNC_DECL tmat4x4<valType, P> scaleBias(
100  tmat4x4<valType, P> const & m,
101  valType scale,
102  valType bias);
103 
105 }// namespace glm
106 
107 #include "transform2.inl"
GLM_FUNC_DECL tmat4x4< valType, P > scaleBias(tmat4x4< valType, P > const &m, valType scale, valType bias)
Build a scale bias matrix.
GLM_FUNC_DECL tmat3x3< T, P > proj2D(const tmat3x3< T, P > &m, const tvec3< T, P > &normal)
Build planar projection matrix along normal axis.
GLM_FUNC_DECL tmat4x4< T, P > proj3D(const tmat4x4< T, P > &m, const tvec3< T, P > &normal)
Build planar projection matrix along normal axis.
Definition: _noise.hpp:11
GLM_FUNC_DECL tmat3x3< T, P > shearY2D(tmat3x3< T, P > const &m, T x)
Transforms a matrix with a shearing on Y axis.
GLM_FUNC_DECL tmat4x4< T, P > shearY3D(const tmat4x4< T, P > &m, T x, T z)
Transforms a matrix with a shearing on Y axis.
GLM_FUNC_DECL tmat3x3< T, P > shearX2D(tmat3x3< T, P > const &m, T y)
Transforms a matrix with a shearing on X axis.
GLM_FUNC_DECL tmat4x4< T, P > shearX3D(const tmat4x4< T, P > &m, T y, T z)
Transforms a matrix with a shearing on X axis From GLM_GTX_transform2 extension.
GLM_FUNC_DECL tmat4x4< T, P > scale(tmat4x4< T, P > const &m, tvec3< T, P > const &v)
Builds a scale 4 * 4 matrix created from 3 scalars.
GLM_FUNC_DECL tmat4x4< T, P > shearZ3D(const tmat4x4< T, P > &m, T x, T y)
Transforms a matrix with a shearing on Z axis.