0.9.9 API documenation
|
Functions | |
template<typename genType > | |
GLM_FUNC_DECL GLM_CONSTEXPR genType | identity () |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL mat< 4, 4, T, Q > | lookAt (vec< 3, T, Q > const &eye, vec< 3, T, Q > const ¢er, vec< 3, T, Q > const &up) |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL mat< 4, 4, T, Q > | lookAtLH (vec< 3, T, Q > const &eye, vec< 3, T, Q > const ¢er, vec< 3, T, Q > const &up) |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL mat< 4, 4, T, Q > | lookAtRH (vec< 3, T, Q > const &eye, vec< 3, T, Q > const ¢er, vec< 3, T, Q > const &up) |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL mat< 4, 4, T, Q > | rotate (mat< 4, 4, T, Q > const &m, T angle, vec< 3, T, Q > const &axis) |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL mat< 4, 4, T, Q > | scale (mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v) |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL mat< 4, 4, T, Q > | translate (mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v) |
Defines functions that generate common transformation matrices.
The matrices generated by this extension use standard OpenGL fixed-function conventions. For example, the lookAt function generates a transform from world space into the specific eye space that the projective matrix functions (perspective, ortho, etc) are designed to expect. The OpenGL compatibility specifications defines the particular layout of this eye space.
Include <glm/ext/matrix_transform.hpp> to use the features of this extension.
GLM_FUNC_DECL mat<4, 4, T, Q> glm::lookAt | ( | vec< 3, T, Q > const & | eye, |
vec< 3, T, Q > const & | center, | ||
vec< 3, T, Q > const & | up | ||
) |
Build a look at view matrix based on the default handedness.
eye | Position of the camera |
center | Position where the camera is looking at |
up | Normalized up vector, how the camera is oriented. Typically (0, 0, 1) |
T | A floating-point scalar type |
Q | A value from qualifier enum |
GLM_FUNC_DECL mat<4, 4, T, Q> glm::lookAtLH | ( | vec< 3, T, Q > const & | eye, |
vec< 3, T, Q > const & | center, | ||
vec< 3, T, Q > const & | up | ||
) |
Build a left handed look at view matrix.
eye | Position of the camera |
center | Position where the camera is looking at |
up | Normalized up vector, how the camera is oriented. Typically (0, 0, 1) |
T | A floating-point scalar type |
Q | A value from qualifier enum |
GLM_FUNC_DECL mat<4, 4, T, Q> glm::lookAtRH | ( | vec< 3, T, Q > const & | eye, |
vec< 3, T, Q > const & | center, | ||
vec< 3, T, Q > const & | up | ||
) |
Build a right handed look at view matrix.
eye | Position of the camera |
center | Position where the camera is looking at |
up | Normalized up vector, how the camera is oriented. Typically (0, 0, 1) |
T | A floating-point scalar type |
Q | A value from qualifier enum |
GLM_FUNC_DECL mat<4, 4, T, Q> glm::rotate | ( | mat< 4, 4, T, Q > const & | m, |
T | angle, | ||
vec< 3, T, Q > const & | axis | ||
) |
Builds a rotation 4 * 4 matrix created from an axis vector and an angle.
m | Input matrix multiplied by this rotation matrix. |
angle | Rotation angle expressed in radians. |
axis | Rotation axis, recommended to be normalized. |
T | A floating-point scalar type |
Q | A value from qualifier enum |
GLM_FUNC_DECL mat<4, 4, T, Q> glm::scale | ( | mat< 4, 4, T, Q > const & | m, |
vec< 3, T, Q > const & | v | ||
) |
Builds a scale 4 * 4 matrix created from 3 scalars.
m | Input matrix multiplied by this scale matrix. |
v | Ratio of scaling for each axis. |
T | A floating-point scalar type |
Q | A value from qualifier enum |
GLM_FUNC_DECL mat<4, 4, T, Q> glm::translate | ( | mat< 4, 4, T, Q > const & | m, |
vec< 3, T, Q > const & | v | ||
) |
Builds a translation 4 * 4 matrix created from a vector of 3 components.
m | Input matrix multiplied by this translation matrix. |
v | Coordinates of a translation vector. |
T | A floating-point scalar type |
Q | A value from qualifier enum |