/// Creates a matrix for a symetric perspective-view frustum.
/// Creates a matrix for a symetric perspective-view frustum based on the default handedness.
///
///
/// @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).
@ -186,7 +186,38 @@ namespace glm
Tnear,
Tnear,
Tfar);
Tfar);
/// Builds a perspective projection matrix based on a field of view.
/// Creates a matrix for a right handed, symetric perspective-view frustum.
///
/// @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 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).
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
/// @see gtc_matrix_transform
template<typenameT>
GLM_FUNC_DECLtmat4x4<T,defaultp>perspectiveRH(
Tfovy,
Taspect,
Tnear,
Tfar);
/// Creates a matrix for a left handed, symetric perspective-view frustum.
///
/// @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 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).
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
/// @see gtc_matrix_transform
template<typenameT>
GLM_FUNC_DECLtmat4x4<T,defaultp>perspectiveLH(
Tfovy,
Taspect,
Tnear,
Tfar);
/// 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 width
@ -203,6 +234,40 @@ namespace glm
Tnear,
Tnear,
Tfar);
Tfar);
/// Builds a right handed perspective projection matrix based on a field of view.
///
/// @param fov Expressed in radians.
/// @param width
/// @param height
/// @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).
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
/// @see gtc_matrix_transform
template<typenameT>
GLM_FUNC_DECLtmat4x4<T,defaultp>perspectiveFovRH(
Tfov,
Twidth,
Theight,
Tnear,
Tfar);
/// Builds a left handed perspective projection matrix based on a field of view.
///
/// @param fov Expressed in radians.
/// @param width
/// @param height
/// @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).
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
/// @see gtc_matrix_transform
template<typenameT>
GLM_FUNC_DECLtmat4x4<T,defaultp>perspectiveFovLH(
Tfov,
Twidth,
Theight,
Tnear,
Tfar);
/// 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.
///
///
/// @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.
@ -285,7 +350,7 @@ namespace glm
tvec2<T,P>const&delta,
tvec2<T,P>const&delta,
tvec4<U,P>const&viewport);
tvec4<U,P>const&viewport);
/// Build a look at view matrix.
/// Build a look at view matrix based on the default handedness.
///
///
/// @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
@ -298,6 +363,32 @@ namespace glm
tvec3<T,P>const¢er,
tvec3<T,P>const¢er,
tvec3<T,P>const&up);
tvec3<T,P>const&up);
/// Build a right handed look at view matrix.
///
/// @param eye Position of the camera
/// @param center Position where the camera is looking at
/// @param up Normalized up vector, how the camera is oriented. Typically (0, 0, 1)
/// @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)
template<typenameT,precisionP>
GLM_FUNC_DECLtmat4x4<T,P>lookAtRH(
tvec3<T,P>const&eye,
tvec3<T,P>const¢er,
tvec3<T,P>const&up);
/// Build a left handed look at view matrix.
///
/// @param eye Position of the camera
/// @param center Position where the camera is looking at
/// @param up Normalized up vector, how the camera is oriented. Typically (0, 0, 1)
/// @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)