|
@@ -54,6 +54,7 @@ namespace glm
|
|
|
/// @see gtc_matrix_transform
|
|
/// @see gtc_matrix_transform
|
|
|
/// @see - translate(mat<4, 4, T, Q> const& m, T x, T y, T z)
|
|
/// @see - translate(mat<4, 4, T, Q> const& m, T x, T y, T z)
|
|
|
/// @see - translate(vec<3, T, Q> const& v)
|
|
/// @see - translate(vec<3, T, Q> const& v)
|
|
|
|
|
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glTranslate.xml">glTranslate man page</a>
|
|
|
template<typename T, qualifier Q>
|
|
template<typename T, qualifier Q>
|
|
|
GLM_FUNC_DECL mat<4, 4, T, Q> translate(
|
|
GLM_FUNC_DECL mat<4, 4, T, Q> translate(
|
|
|
mat<4, 4, T, Q> const& m,
|
|
mat<4, 4, T, Q> const& m,
|
|
@@ -68,6 +69,7 @@ namespace glm
|
|
|
/// @see gtc_matrix_transform
|
|
/// @see gtc_matrix_transform
|
|
|
/// @see - rotate(mat<4, 4, T, Q> const& m, T angle, T x, T y, T z)
|
|
/// @see - rotate(mat<4, 4, T, Q> const& m, T angle, T x, T y, T z)
|
|
|
/// @see - rotate(T angle, vec<3, T, Q> const& v)
|
|
/// @see - rotate(T angle, vec<3, T, Q> const& v)
|
|
|
|
|
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glRotate.xml">glRotate man page</a>
|
|
|
template<typename T, qualifier Q>
|
|
template<typename T, qualifier Q>
|
|
|
GLM_FUNC_DECL mat<4, 4, T, Q> rotate(
|
|
GLM_FUNC_DECL mat<4, 4, T, Q> rotate(
|
|
|
mat<4, 4, T, Q> const& m,
|
|
mat<4, 4, T, Q> const& m,
|
|
@@ -82,6 +84,7 @@ namespace glm
|
|
|
/// @see gtc_matrix_transform
|
|
/// @see gtc_matrix_transform
|
|
|
/// @see - scale(mat<4, 4, T, Q> const& m, T x, T y, T z)
|
|
/// @see - scale(mat<4, 4, T, Q> const& m, T x, T y, T z)
|
|
|
/// @see - scale(vec<3, T, Q> const& v)
|
|
/// @see - scale(vec<3, T, Q> const& v)
|
|
|
|
|
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glScale.xml">glScale man page</a>
|
|
|
template<typename T, qualifier Q>
|
|
template<typename T, qualifier Q>
|
|
|
GLM_FUNC_DECL mat<4, 4, T, Q> scale(
|
|
GLM_FUNC_DECL mat<4, 4, T, Q> scale(
|
|
|
mat<4, 4, T, Q> const& m,
|
|
mat<4, 4, T, Q> const& m,
|
|
@@ -89,15 +92,10 @@ namespace glm
|
|
|
|
|
|
|
|
/// Creates a matrix for an orthographic parallel viewing volume, using the default handedness.
|
|
/// Creates a matrix for an orthographic parallel viewing volume, using the default handedness.
|
|
|
///
|
|
///
|
|
|
- /// @param left
|
|
|
|
|
- /// @param right
|
|
|
|
|
- /// @param bottom
|
|
|
|
|
- /// @param top
|
|
|
|
|
- /// @param zNear
|
|
|
|
|
- /// @param zFar
|
|
|
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
|
/// @see gtc_matrix_transform
|
|
/// @see gtc_matrix_transform
|
|
|
/// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
|
|
/// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
|
|
|
|
|
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glOrtho.xml">glOrtho man page</a>
|
|
|
template<typename T>
|
|
template<typename T>
|
|
|
GLM_FUNC_DECL mat<4, 4, T, defaultp> ortho(
|
|
GLM_FUNC_DECL mat<4, 4, T, defaultp> ortho(
|
|
|
T left,
|
|
T left,
|
|
@@ -109,12 +107,6 @@ namespace glm
|
|
|
|
|
|
|
|
/// Creates a matrix for an orthographic parallel viewing volume, using left-handedness.
|
|
/// Creates a matrix for an orthographic parallel viewing volume, using left-handedness.
|
|
|
///
|
|
///
|
|
|
- /// @param left
|
|
|
|
|
- /// @param right
|
|
|
|
|
- /// @param bottom
|
|
|
|
|
- /// @param top
|
|
|
|
|
- /// @param zNear
|
|
|
|
|
- /// @param zFar
|
|
|
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
|
/// @see gtc_matrix_transform
|
|
/// @see gtc_matrix_transform
|
|
|
/// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
|
|
/// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
|
|
@@ -129,12 +121,6 @@ namespace glm
|
|
|
|
|
|
|
|
/// Creates a matrix for an orthographic parallel viewing volume, using right-handedness.
|
|
/// Creates a matrix for an orthographic parallel viewing volume, using right-handedness.
|
|
|
///
|
|
///
|
|
|
- /// @param left
|
|
|
|
|
- /// @param right
|
|
|
|
|
- /// @param bottom
|
|
|
|
|
- /// @param top
|
|
|
|
|
- /// @param zNear
|
|
|
|
|
- /// @param zFar
|
|
|
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
|
/// @see gtc_matrix_transform
|
|
/// @see gtc_matrix_transform
|
|
|
/// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
|
|
/// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
|
|
@@ -149,13 +135,10 @@ namespace glm
|
|
|
|
|
|
|
|
/// Creates a matrix for projecting two-dimensional coordinates onto the screen.
|
|
/// Creates a matrix for projecting two-dimensional coordinates onto the screen.
|
|
|
///
|
|
///
|
|
|
- /// @param left
|
|
|
|
|
- /// @param right
|
|
|
|
|
- /// @param bottom
|
|
|
|
|
- /// @param top
|
|
|
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
|
/// @see gtc_matrix_transform
|
|
/// @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)
|
|
/// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top, T const& zNear, T const& zFar)
|
|
|
|
|
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluOrtho2D.xml">gluOrtho2D man page</a>
|
|
|
template<typename T>
|
|
template<typename T>
|
|
|
GLM_FUNC_DECL mat<4, 4, T, defaultp> ortho(
|
|
GLM_FUNC_DECL mat<4, 4, T, defaultp> ortho(
|
|
|
T left,
|
|
T left,
|
|
@@ -165,14 +148,9 @@ namespace glm
|
|
|
|
|
|
|
|
/// Creates a frustum matrix with default handedness.
|
|
/// Creates a frustum matrix with default handedness.
|
|
|
///
|
|
///
|
|
|
- /// @param left
|
|
|
|
|
- /// @param right
|
|
|
|
|
- /// @param bottom
|
|
|
|
|
- /// @param top
|
|
|
|
|
- /// @param near
|
|
|
|
|
- /// @param far
|
|
|
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
|
/// @see gtc_matrix_transform
|
|
/// @see gtc_matrix_transform
|
|
|
|
|
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glFrustum.xml">glFrustum man page</a>
|
|
|
template<typename T>
|
|
template<typename T>
|
|
|
GLM_FUNC_DECL mat<4, 4, T, defaultp> frustum(
|
|
GLM_FUNC_DECL mat<4, 4, T, defaultp> frustum(
|
|
|
T left,
|
|
T left,
|
|
@@ -184,12 +162,6 @@ namespace glm
|
|
|
|
|
|
|
|
/// Creates a left handed frustum matrix.
|
|
/// Creates a left handed frustum matrix.
|
|
|
///
|
|
///
|
|
|
- /// @param left
|
|
|
|
|
- /// @param right
|
|
|
|
|
- /// @param bottom
|
|
|
|
|
- /// @param top
|
|
|
|
|
- /// @param near
|
|
|
|
|
- /// @param far
|
|
|
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
|
/// @see gtc_matrix_transform
|
|
/// @see gtc_matrix_transform
|
|
|
template<typename T>
|
|
template<typename T>
|
|
@@ -203,12 +175,6 @@ namespace glm
|
|
|
|
|
|
|
|
/// Creates a right handed frustum matrix.
|
|
/// Creates a right handed frustum matrix.
|
|
|
///
|
|
///
|
|
|
- /// @param left
|
|
|
|
|
- /// @param right
|
|
|
|
|
- /// @param bottom
|
|
|
|
|
- /// @param top
|
|
|
|
|
- /// @param near
|
|
|
|
|
- /// @param far
|
|
|
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
|
/// @see gtc_matrix_transform
|
|
/// @see gtc_matrix_transform
|
|
|
template<typename T>
|
|
template<typename T>
|
|
@@ -228,6 +194,7 @@ namespace glm
|
|
|
/// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
|
|
/// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
|
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
|
/// @see gtc_matrix_transform
|
|
/// @see gtc_matrix_transform
|
|
|
|
|
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluPerspective.xml">gluPerspective man page</a>
|
|
|
template<typename T>
|
|
template<typename T>
|
|
|
GLM_FUNC_DECL mat<4, 4, T, defaultp> perspective(
|
|
GLM_FUNC_DECL mat<4, 4, T, defaultp> perspective(
|
|
|
T fovy,
|
|
T fovy,
|
|
@@ -268,8 +235,8 @@ namespace glm
|
|
|
/// Builds a perspective projection matrix based on a field of view and the default handedness.
|
|
/// Builds a perspective projection matrix based on a field of view and the default handedness.
|
|
|
///
|
|
///
|
|
|
/// @param fov Expressed in radians.
|
|
/// @param fov Expressed in radians.
|
|
|
- /// @param width
|
|
|
|
|
- /// @param height
|
|
|
|
|
|
|
+ /// @param width Width of the viewport
|
|
|
|
|
+ /// @param height Height of the viewport
|
|
|
/// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
|
|
/// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
|
|
|
/// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
|
|
/// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
|
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
@@ -285,8 +252,8 @@ namespace glm
|
|
|
/// Builds a right handed perspective projection matrix based on a field of view.
|
|
/// Builds a right handed perspective projection matrix based on a field of view.
|
|
|
///
|
|
///
|
|
|
/// @param fov Expressed in radians.
|
|
/// @param fov Expressed in radians.
|
|
|
- /// @param width
|
|
|
|
|
- /// @param height
|
|
|
|
|
|
|
+ /// @param width Width of the viewport
|
|
|
|
|
+ /// @param height Height of the viewport
|
|
|
/// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
|
|
/// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
|
|
|
/// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
|
|
/// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
|
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
@@ -302,8 +269,8 @@ namespace glm
|
|
|
/// Builds a left handed perspective projection matrix based on a field of view.
|
|
/// Builds a left handed perspective projection matrix based on a field of view.
|
|
|
///
|
|
///
|
|
|
/// @param fov Expressed in radians.
|
|
/// @param fov Expressed in radians.
|
|
|
- /// @param width
|
|
|
|
|
- /// @param height
|
|
|
|
|
|
|
+ /// @param width Width of the viewport
|
|
|
|
|
+ /// @param height Height of the viewport
|
|
|
/// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
|
|
/// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
|
|
|
/// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
|
|
/// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
|
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
@@ -365,7 +332,7 @@ namespace glm
|
|
|
/// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
|
|
/// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
|
|
|
/// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
|
|
/// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
|
|
|
/// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
|
|
/// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
|
|
|
- /// @param ep
|
|
|
|
|
|
|
+ /// @param ep Epsilon
|
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
|
|
|
/// @see gtc_matrix_transform
|
|
/// @see gtc_matrix_transform
|
|
|
template<typename T>
|
|
template<typename T>
|
|
@@ -382,6 +349,7 @@ namespace glm
|
|
|
/// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double.
|
|
/// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double.
|
|
|
/// @tparam U Currently supported: Floating-point types and integer types.
|
|
/// @tparam U Currently supported: Floating-point types and integer types.
|
|
|
/// @see gtc_matrix_transform
|
|
/// @see gtc_matrix_transform
|
|
|
|
|
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluProject.xml">gluProject man page</a>
|
|
|
template<typename T, typename U, qualifier Q>
|
|
template<typename T, typename U, qualifier Q>
|
|
|
GLM_FUNC_DECL vec<3, T, Q> project(
|
|
GLM_FUNC_DECL vec<3, T, Q> project(
|
|
|
vec<3, T, Q> const& obj,
|
|
vec<3, T, Q> const& obj,
|
|
@@ -399,6 +367,7 @@ namespace glm
|
|
|
/// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double.
|
|
/// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double.
|
|
|
/// @tparam U Currently supported: Floating-point types and integer types.
|
|
/// @tparam U Currently supported: Floating-point types and integer types.
|
|
|
/// @see gtc_matrix_transform
|
|
/// @see gtc_matrix_transform
|
|
|
|
|
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluUnProject.xml">gluUnProject man page</a>
|
|
|
template<typename T, typename U, qualifier Q>
|
|
template<typename T, typename U, qualifier Q>
|
|
|
GLM_FUNC_DECL vec<3, T, Q> unProject(
|
|
GLM_FUNC_DECL vec<3, T, Q> unProject(
|
|
|
vec<3, T, Q> const& win,
|
|
vec<3, T, Q> const& win,
|
|
@@ -408,12 +377,13 @@ namespace glm
|
|
|
|
|
|
|
|
/// Define a picking region
|
|
/// Define a picking region
|
|
|
///
|
|
///
|
|
|
- /// @param center
|
|
|
|
|
- /// @param delta
|
|
|
|
|
- /// @param viewport
|
|
|
|
|
|
|
+ /// @param center Specify the center of a picking region in window coordinates.
|
|
|
|
|
+ /// @param delta Specify the width and height, respectively, of the picking region in window coordinates.
|
|
|
|
|
+ /// @param viewport Rendering viewport
|
|
|
/// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double.
|
|
/// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double.
|
|
|
/// @tparam U Currently supported: Floating-point types and integer types.
|
|
/// @tparam U Currently supported: Floating-point types and integer types.
|
|
|
/// @see gtc_matrix_transform
|
|
/// @see gtc_matrix_transform
|
|
|
|
|
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluPickMatrix.xml">gluPickMatrix man page</a>
|
|
|
template<typename T, qualifier Q, typename U>
|
|
template<typename T, qualifier Q, typename U>
|
|
|
GLM_FUNC_DECL mat<4, 4, T, Q> pickMatrix(
|
|
GLM_FUNC_DECL mat<4, 4, T, Q> pickMatrix(
|
|
|
vec<2, T, Q> const& center,
|
|
vec<2, T, Q> const& center,
|
|
@@ -427,6 +397,7 @@ namespace glm
|
|
|
/// @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)
|
|
|
/// @see gtc_matrix_transform
|
|
/// @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)
|
|
/// @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)
|
|
|
|
|
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluLookAt.xml">gluLookAt man page</a>
|
|
|
template<typename T, qualifier Q>
|
|
template<typename T, qualifier Q>
|
|
|
GLM_FUNC_DECL mat<4, 4, T, Q> lookAt(
|
|
GLM_FUNC_DECL mat<4, 4, T, Q> lookAt(
|
|
|
vec<3, T, Q> const& eye,
|
|
vec<3, T, Q> const& eye,
|