0.9.8
Functions
GLM_GTX_matrix_transform_2d

Functions

template<typename T , precision P>
GLM_FUNC_QUALIFIER tmat3x3< T, P > rotate (tmat3x3< T, P > const &m, T angle)
 
template<typename T , precision P>
GLM_FUNC_QUALIFIER tmat3x3< T, P > scale (tmat3x3< T, P > const &m, tvec2< T, P > const &v)
 
template<typename T , precision P>
GLM_FUNC_QUALIFIER tmat3x3< T, P > shearX (tmat3x3< T, P > const &m, T y)
 
template<typename T , precision P>
GLM_FUNC_QUALIFIER tmat3x3< T, P > shearY (tmat3x3< T, P > const &m, T x)
 
template<typename T , precision P>
GLM_FUNC_QUALIFIER tmat3x3< T, P > translate (tmat3x3< T, P > const &m, tvec2< T, P > const &v)
 

Detailed Description

Defines functions that generate common 2d transformation matrices.

<glm/gtx/matrix_transform_2d.hpp> need to be included to use these functionalities.

Function Documentation

GLM_FUNC_QUALIFIER tmat3x3<T, P> glm::rotate ( tmat3x3< T, P > const &  m,
angle 
)

Builds a rotation 3 * 3 matrix created from an angle.

Parameters
mInput matrix multiplied by this translation matrix.
angleRotation angle expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise.
GLM_FUNC_QUALIFIER tmat3x3<T, P> glm::scale ( tmat3x3< T, P > const &  m,
tvec2< T, P > const &  v 
)

Builds a scale 3 * 3 matrix created from a vector of 2 components.

Parameters
mInput matrix multiplied by this translation matrix.
vCoordinates of a scale vector.
GLM_FUNC_QUALIFIER tmat3x3<T, P> glm::shearX ( tmat3x3< T, P > const &  m,
y 
)

Builds an horizontal (parallel to the x axis) shear 3 * 3 matrix.

Parameters
mInput matrix multiplied by this translation matrix.
yShear factor.
GLM_FUNC_QUALIFIER tmat3x3<T, P> glm::shearY ( tmat3x3< T, P > const &  m,
x 
)

Builds a vertical (parallel to the y axis) shear 3 * 3 matrix.

Parameters
mInput matrix multiplied by this translation matrix.
xShear factor.
GLM_FUNC_QUALIFIER tmat3x3<T, P> glm::translate ( tmat3x3< T, P > const &  m,
tvec2< T, P > const &  v 
)

Builds a translation 3 * 3 matrix created from a vector of 2 components.

Parameters
mInput matrix multiplied by this translation matrix.
vCoordinates of a translation vector.