0.9.6
transform2.hpp
Go to the documentation of this file.
1 
39 #pragma once
40 
41 // Dependency:
42 #include "../glm.hpp"
43 #include "../gtx/transform.hpp"
44 
45 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
46 # pragma message("GLM: GLM_GTX_transform2 extension included")
47 #endif
48 
49 namespace glm
50 {
53 
56  template <typename T, precision P>
57  GLM_FUNC_DECL tmat3x3<T, P> shearX2D(
58  tmat3x3<T, P> const & m,
59  T y);
60 
63  template <typename T, precision P>
64  GLM_FUNC_DECL tmat3x3<T, P> shearY2D(
65  tmat3x3<T, P> const & m,
66  T x);
67 
70  template <typename T, precision P>
71  GLM_FUNC_DECL tmat4x4<T, P> shearX3D(
72  const tmat4x4<T, P> & m,
73  T y,
74  T z);
75 
78  template <typename T, precision P>
79  GLM_FUNC_DECL tmat4x4<T, P> shearY3D(
80  const tmat4x4<T, P> & m,
81  T x,
82  T z);
83 
86  template <typename T, precision P>
87  GLM_FUNC_DECL tmat4x4<T, P> shearZ3D(
88  const tmat4x4<T, P> & m,
89  T x,
90  T y);
91 
92  //template <typename T> GLM_FUNC_QUALIFIER tmat4x4<T, P> shear(const tmat4x4<T, P> & m, shearPlane, planePoint, angle)
93  // Identity + tan(angle) * cross(Normal, OnPlaneVector) 0
94  // - dot(PointOnPlane, normal) * OnPlaneVector 1
95 
96  // Reflect functions seem to don't work
97  //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)
98  //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)
99 
102  template <typename T, precision P>
103  GLM_FUNC_DECL tmat3x3<T, P> proj2D(
104  const tmat3x3<T, P> & m,
105  const tvec3<T, P>& normal);
106 
109  template <typename T, precision P>
110  GLM_FUNC_DECL tmat4x4<T, P> proj3D(
111  const tmat4x4<T, P> & m,
112  const tvec3<T, P>& normal);
113 
116  template <typename valType, precision P>
117  GLM_FUNC_DECL tmat4x4<valType, P> scaleBias(
118  valType scale,
119  valType bias);
120 
123  template <typename valType, precision P>
124  GLM_FUNC_DECL tmat4x4<valType, P> scaleBias(
125  tmat4x4<valType, P> const & m,
126  valType scale,
127  valType bias);
128 
130 }// namespace glm
131 
132 #include "transform2.inl"
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 > shearZ3D(const tmat4x4< T, P > &m, T x, T y)
Transforms a matrix with a shearing on Z axis.
Definition: _noise.hpp:31
GLM_FUNC_DECL tmat4x4< valType, P > scaleBias(tmat4x4< valType, P > const &m, valType scale, valType bias)
Build a scale bias matrix.
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 > proj3D(const tmat4x4< T, P > &m, const tvec3< T, P > &normal)
Build planar projection matrix along normal axis.
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 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.