0.9.7
transform2.hpp
Go to the documentation of this file.
1 
43 #pragma once
44 
45 // Dependency:
46 #include "../glm.hpp"
47 #include "../gtx/transform.hpp"
48 
49 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
50 # pragma message("GLM: GLM_GTX_transform2 extension included")
51 #endif
52 
53 namespace glm
54 {
57 
60  template <typename T, precision P>
61  GLM_FUNC_DECL tmat3x3<T, P> shearX2D(
62  tmat3x3<T, P> const & m,
63  T y);
64 
67  template <typename T, precision P>
68  GLM_FUNC_DECL tmat3x3<T, P> shearY2D(
69  tmat3x3<T, P> const & m,
70  T x);
71 
74  template <typename T, precision P>
75  GLM_FUNC_DECL tmat4x4<T, P> shearX3D(
76  const tmat4x4<T, P> & m,
77  T y,
78  T z);
79 
82  template <typename T, precision P>
83  GLM_FUNC_DECL tmat4x4<T, P> shearY3D(
84  const tmat4x4<T, P> & m,
85  T x,
86  T z);
87 
90  template <typename T, precision P>
91  GLM_FUNC_DECL tmat4x4<T, P> shearZ3D(
92  const tmat4x4<T, P> & m,
93  T x,
94  T y);
95 
96  //template <typename T> GLM_FUNC_QUALIFIER tmat4x4<T, P> shear(const tmat4x4<T, P> & m, shearPlane, planePoint, angle)
97  // Identity + tan(angle) * cross(Normal, OnPlaneVector) 0
98  // - dot(PointOnPlane, normal) * OnPlaneVector 1
99 
100  // Reflect functions seem to don't work
101  //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)
102  //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)
103 
106  template <typename T, precision P>
107  GLM_FUNC_DECL tmat3x3<T, P> proj2D(
108  const tmat3x3<T, P> & m,
109  const tvec3<T, P>& normal);
110 
113  template <typename T, precision P>
114  GLM_FUNC_DECL tmat4x4<T, P> proj3D(
115  const tmat4x4<T, P> & m,
116  const tvec3<T, P>& normal);
117 
120  template <typename valType, precision P>
121  GLM_FUNC_DECL tmat4x4<valType, P> scaleBias(
122  valType scale,
123  valType bias);
124 
127  template <typename valType, precision P>
128  GLM_FUNC_DECL tmat4x4<valType, P> scaleBias(
129  tmat4x4<valType, P> const & m,
130  valType scale,
131  valType bias);
132 
134 }// namespace glm
135 
136 #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 tmat4x4< T, P > shearZ3D(const tmat4x4< T, P > &m, T x, T y)
Transforms a matrix with a shearing on Z 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.
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 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 > 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 > proj3D(const tmat4x4< T, P > &m, const tvec3< T, P > &normal)
Build planar projection matrix along normal axis.
Definition: _noise.hpp:40
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.