mirror of
https://github.com/g-truc/glm.git
synced 2024-11-23 01:14:34 +00:00
Merge branch '0.9.3' of ssh://ogl-math.git.sourceforge.net/gitroot/ogl-math/ogl-math into 0.9.3
This commit is contained in:
commit
0a88984a12
@ -59,22 +59,40 @@ namespace glm
|
|||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
/// Builds a translation 4 * 4 matrix created from a vector of 3 components.
|
/// Builds a translation 4 * 4 matrix created from a vector of 3 components.
|
||||||
/// @see - gtc_matrix_transform
|
///
|
||||||
/// @see - gtx_transform
|
/// @param m Matrix multiplied by this translation matrix.
|
||||||
// - @ref template <typename T> detail::tmat4x4<T> translate(T x, T y, T z)
|
/// @param v Coordinates of a translation vector.
|
||||||
// - @ref template <typename T> detail::tmat4x4<T> translate(detail::tmat4x4<T> const & m, T x, T y, T z)
|
///
|
||||||
// - @ref template <typename T> detail::tmat4x4<T> translate(detail::tvec3<T> const & v)
|
/// @tparam T Value type used to build the translation matrix. Currently supported: half (not recommanded), float or double.
|
||||||
|
///
|
||||||
|
/// @code
|
||||||
|
/// #include <glm/glm.hpp>
|
||||||
|
/// #include <glm/gtc/matrix_transform.hpp>
|
||||||
|
/// ...
|
||||||
|
/// glm::mat4 m = glm::translate(glm::mat4(1.0f), glm::vec3(1.0f));
|
||||||
|
/// // m[0][0] == 1.0f, m[0][1] == 0.0f, m[0][2] == 0.0f, m[0][3] == 0.0f
|
||||||
|
/// // m[1][0] == 0.0f, m[1][1] == 1.0f, m[1][2] == 0.0f, m[1][3] == 0.0f
|
||||||
|
/// // m[2][0] == 0.0f, m[2][1] == 0.0f, m[2][2] == 1.0f, m[2][3] == 0.0f
|
||||||
|
/// // m[3][0] == 1.0f, m[3][1] == 1.0f, m[3][2] == 1.0f, m[3][3] == 1.0f
|
||||||
|
/// @endcode
|
||||||
|
///
|
||||||
|
/// @see gtc_matrix_transform
|
||||||
|
/// @see gtx_transform
|
||||||
|
/// @see - translate(T x, T y, T z)
|
||||||
|
/// @see - translate(detail::tmat4x4<T> const & m, T x, T y, T z)
|
||||||
|
/// @see - translate(detail::tvec3<T> const & v)
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> translate(
|
detail::tmat4x4<T> translate(
|
||||||
detail::tmat4x4<T> const & m,
|
detail::tmat4x4<T> const & m,
|
||||||
detail::tvec3<T> const & v);
|
detail::tvec3<T> const & v);
|
||||||
|
|
||||||
/// Builds a rotation 4 * 4 matrix created from an axis vector and an angle expressed in degrees.
|
/// Builds a rotation 4 * 4 matrix created from an axis vector and an angle expressed in degrees.
|
||||||
/// @see - gtc_matrix_transform
|
///
|
||||||
/// @see - gtx_transform
|
/// @see gtc_matrix_transform
|
||||||
// - @link glm::rotate(T angle, T x, T y, T z) rotate(T const & angle, T const & x, T const & y, T const & z) @endlink
|
/// @see gtx_transform
|
||||||
// - @link glm::rotate(detail::tmat4x4<T> const & m, T angle, T x, T y, T z) rotate(mat4x4<T> const & m, T const & angle, T const & x, T const & y, T const & z) @endlink
|
/// @see - rotate(T angle, T x, T y, T z)
|
||||||
// - @link glm::rotate(T angle, detail::tvec3<T> const & v) rotate(T const & angle, vec3<T> const & v) @endlink
|
/// @see - rotate(detail::tmat4x4<T> const & m, T angle, T x, T y, T z)
|
||||||
|
/// @see - rotate(T angle, detail::tvec3<T> const & v)
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> rotate(
|
detail::tmat4x4<T> rotate(
|
||||||
detail::tmat4x4<T> const & m,
|
detail::tmat4x4<T> const & m,
|
||||||
@ -82,19 +100,21 @@ namespace glm
|
|||||||
detail::tvec3<T> const & v);
|
detail::tvec3<T> const & v);
|
||||||
|
|
||||||
/// Builds a scale 4 * 4 matrix created from 3 scalars.
|
/// Builds a scale 4 * 4 matrix created from 3 scalars.
|
||||||
/// @see - gtc_matrix_transform
|
///
|
||||||
/// @see - gtx_transform
|
/// @see gtc_matrix_transform
|
||||||
// - @link scale(T x, T y, T z) scale(T const & x, T const & y, T const & z) @endlink
|
/// @see gtx_transform
|
||||||
// - @link scale(detail::tmat4x4<T> const & m, T x, T y, T z) scale(mat4x4<T> const & m, T const & angle, T const & x, T const & y, T const & z) @endlink
|
/// @see - scale(T x, T y, T z) scale(T const & x, T const & y, T const & z)
|
||||||
// - @link scale(detail::tvec3<T> const & v) scale(vec3<T> const & v) @endlink
|
/// @see - scale(detail::tmat4x4<T> const & m, T x, T y, T z)
|
||||||
|
/// @see - scale(detail::tvec3<T> const & v)
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> scale(
|
detail::tmat4x4<T> scale(
|
||||||
detail::tmat4x4<T> const & m,
|
detail::tmat4x4<T> const & m,
|
||||||
detail::tvec3<T> const & v);
|
detail::tvec3<T> const & v);
|
||||||
|
|
||||||
/// Creates a matrix for an orthographic parallel viewing volume.
|
/// Creates a matrix for an orthographic parallel viewing volume.
|
||||||
/// @see - gtc_matrix_transform
|
///
|
||||||
// - @link glm::ortho(T const & left, T const & right, T const & bottom, T const & top) ortho(T const & left, T const & right, T const & bottom, T const & top) @endlink
|
/// @see gtc_matrix_transform
|
||||||
|
/// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top)
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> ortho(
|
detail::tmat4x4<T> ortho(
|
||||||
T const & left,
|
T const & left,
|
||||||
@ -105,8 +125,9 @@ namespace glm
|
|||||||
T const & zFar);
|
T const & zFar);
|
||||||
|
|
||||||
/// Creates a matrix for projecting two-dimensional coordinates onto the screen.
|
/// Creates a matrix for projecting two-dimensional coordinates onto the screen.
|
||||||
/// @see - gtc_matrix_transform
|
///
|
||||||
// - @link glm::ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar) ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar) @endlink
|
/// @see gtc_matrix_transform
|
||||||
|
/// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar)
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> ortho(
|
detail::tmat4x4<T> ortho(
|
||||||
T const & left,
|
T const & left,
|
||||||
@ -115,7 +136,8 @@ namespace glm
|
|||||||
T const & top);
|
T const & top);
|
||||||
|
|
||||||
/// Creates a frustum matrix.
|
/// Creates a frustum matrix.
|
||||||
/// @see - gtc_matrix_transform
|
///
|
||||||
|
/// @see gtc_matrix_transform
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> frustum(
|
detail::tmat4x4<T> frustum(
|
||||||
T const & left,
|
T const & left,
|
||||||
@ -126,7 +148,8 @@ namespace glm
|
|||||||
T const & farVal);
|
T const & farVal);
|
||||||
|
|
||||||
/// Creates a matrix for a symetric perspective-view frustum.
|
/// Creates a matrix for a symetric perspective-view frustum.
|
||||||
/// @see - gtc_matrix_transform
|
///
|
||||||
|
/// @see gtc_matrix_transform
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> perspective(
|
detail::tmat4x4<T> perspective(
|
||||||
T const & fovy,
|
T const & fovy,
|
||||||
@ -134,8 +157,9 @@ namespace glm
|
|||||||
T const & zNear,
|
T const & zNear,
|
||||||
T const & zFar);
|
T const & zFar);
|
||||||
|
|
||||||
/// Builds a perspective projection matrix based on a field of view
|
/// Builds a perspective projection matrix based on a field of view.
|
||||||
/// @see - gtc_matrix_transform
|
///
|
||||||
|
/// @see gtc_matrix_transform
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tmat4x4<valType> perspectiveFov(
|
detail::tmat4x4<valType> perspectiveFov(
|
||||||
valType const & fov,
|
valType const & fov,
|
||||||
@ -145,19 +169,22 @@ namespace glm
|
|||||||
valType const & zFar);
|
valType const & zFar);
|
||||||
|
|
||||||
/// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite.
|
/// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite.
|
||||||
/// @see - gtc_matrix_transform
|
///
|
||||||
|
/// @see gtc_matrix_transform
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> infinitePerspective(
|
detail::tmat4x4<T> infinitePerspective(
|
||||||
T fovy, T aspect, T zNear);
|
T fovy, T aspect, T zNear);
|
||||||
|
|
||||||
/// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping.
|
/// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping.
|
||||||
/// @see - gtc_matrix_transform
|
///
|
||||||
|
/// @see gtc_matrix_transform
|
||||||
template <typename T>
|
template <typename T>
|
||||||
detail::tmat4x4<T> tweakedInfinitePerspective(
|
detail::tmat4x4<T> tweakedInfinitePerspective(
|
||||||
T fovy, T aspect, T zNear);
|
T fovy, T aspect, T zNear);
|
||||||
|
|
||||||
/// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.
|
/// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.
|
||||||
/// @see - gtc_matrix_transform
|
///
|
||||||
|
/// @see gtc_matrix_transform
|
||||||
template <typename T, typename U>
|
template <typename T, typename U>
|
||||||
detail::tvec3<T> project(
|
detail::tvec3<T> project(
|
||||||
detail::tvec3<T> const & obj,
|
detail::tvec3<T> const & obj,
|
||||||
@ -166,7 +193,8 @@ namespace glm
|
|||||||
detail::tvec4<U> const & viewport);
|
detail::tvec4<U> const & viewport);
|
||||||
|
|
||||||
/// Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.
|
/// Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.
|
||||||
/// @see - gtc_matrix_transform
|
///
|
||||||
|
/// @see gtc_matrix_transform
|
||||||
template <typename T, typename U>
|
template <typename T, typename U>
|
||||||
detail::tvec3<T> unProject(
|
detail::tvec3<T> unProject(
|
||||||
detail::tvec3<T> const & win,
|
detail::tvec3<T> const & win,
|
||||||
@ -175,7 +203,8 @@ namespace glm
|
|||||||
detail::tvec4<U> const & viewport);
|
detail::tvec4<U> const & viewport);
|
||||||
|
|
||||||
/// Define a picking region
|
/// Define a picking region
|
||||||
/// @see - gtc_matrix_transform
|
///
|
||||||
|
/// @see gtc_matrix_transform
|
||||||
template <typename T, typename U>
|
template <typename T, typename U>
|
||||||
detail::tmat4x4<T> pickMatrix(
|
detail::tmat4x4<T> pickMatrix(
|
||||||
detail::tvec2<T> const & center,
|
detail::tvec2<T> const & center,
|
||||||
@ -183,8 +212,9 @@ namespace glm
|
|||||||
detail::tvec4<U> const & viewport);
|
detail::tvec4<U> const & viewport);
|
||||||
|
|
||||||
/// Build a look at view matrix.
|
/// Build a look at view matrix.
|
||||||
/// @see - gtc_matrix_transform
|
///
|
||||||
// - @link frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) @endlink
|
/// @see gtc_matrix_transform
|
||||||
|
/// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal)
|
||||||
/// @param eye Position of the camera
|
/// @param eye Position of the camera
|
||||||
/// @param center Position where the camera is looking at
|
/// @param center Position where the camera is looking at
|
||||||
/// @param up Normalized up vector, how the camera is oriented. Typically (0, 0, 1)
|
/// @param up Normalized up vector, how the camera is oriented. Typically (0, 0, 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user