|
@@ -60,42 +60,42 @@ namespace glm
|
|
|
/// @see gtx_quaternion
|
|
/// @see gtx_quaternion
|
|
|
template<typename T, precision P>
|
|
template<typename T, precision P>
|
|
|
GLM_FUNC_DECL tquat<T, P> squad(
|
|
GLM_FUNC_DECL tquat<T, P> squad(
|
|
|
- tquat<T, P> const & q1,
|
|
|
|
|
- tquat<T, P> const & q2,
|
|
|
|
|
- tquat<T, P> const & s1,
|
|
|
|
|
- tquat<T, P> const & s2,
|
|
|
|
|
- T const & h);
|
|
|
|
|
|
|
+ tquat<T, P> const& q1,
|
|
|
|
|
+ tquat<T, P> const& q2,
|
|
|
|
|
+ tquat<T, P> const& s1,
|
|
|
|
|
+ tquat<T, P> const& s2,
|
|
|
|
|
+ T const& h);
|
|
|
|
|
|
|
|
//! Returns an intermediate control point for squad interpolation.
|
|
//! Returns an intermediate control point for squad interpolation.
|
|
|
///
|
|
///
|
|
|
/// @see gtx_quaternion
|
|
/// @see gtx_quaternion
|
|
|
template<typename T, precision P>
|
|
template<typename T, precision P>
|
|
|
GLM_FUNC_DECL tquat<T, P> intermediate(
|
|
GLM_FUNC_DECL tquat<T, P> intermediate(
|
|
|
- tquat<T, P> const & prev,
|
|
|
|
|
- tquat<T, P> const & curr,
|
|
|
|
|
- tquat<T, P> const & next);
|
|
|
|
|
|
|
+ tquat<T, P> const& prev,
|
|
|
|
|
+ tquat<T, P> const& curr,
|
|
|
|
|
+ tquat<T, P> const& next);
|
|
|
|
|
|
|
|
//! Returns a exp of a quaternion.
|
|
//! Returns a exp of a quaternion.
|
|
|
///
|
|
///
|
|
|
/// @see gtx_quaternion
|
|
/// @see gtx_quaternion
|
|
|
template<typename T, precision P>
|
|
template<typename T, precision P>
|
|
|
GLM_FUNC_DECL tquat<T, P> exp(
|
|
GLM_FUNC_DECL tquat<T, P> exp(
|
|
|
- tquat<T, P> const & q);
|
|
|
|
|
|
|
+ tquat<T, P> const& q);
|
|
|
|
|
|
|
|
//! Returns a log of a quaternion.
|
|
//! Returns a log of a quaternion.
|
|
|
///
|
|
///
|
|
|
/// @see gtx_quaternion
|
|
/// @see gtx_quaternion
|
|
|
template<typename T, precision P>
|
|
template<typename T, precision P>
|
|
|
GLM_FUNC_DECL tquat<T, P> log(
|
|
GLM_FUNC_DECL tquat<T, P> log(
|
|
|
- tquat<T, P> const & q);
|
|
|
|
|
|
|
+ tquat<T, P> const& q);
|
|
|
|
|
|
|
|
/// Returns x raised to the y power.
|
|
/// Returns x raised to the y power.
|
|
|
///
|
|
///
|
|
|
/// @see gtx_quaternion
|
|
/// @see gtx_quaternion
|
|
|
template<typename T, precision P>
|
|
template<typename T, precision P>
|
|
|
GLM_FUNC_DECL tquat<T, P> pow(
|
|
GLM_FUNC_DECL tquat<T, P> pow(
|
|
|
- tquat<T, P> const & x,
|
|
|
|
|
- T const & y);
|
|
|
|
|
|
|
+ tquat<T, P> const& x,
|
|
|
|
|
+ T const& y);
|
|
|
|
|
|
|
|
//! Returns quarternion square root.
|
|
//! Returns quarternion square root.
|
|
|
///
|
|
///
|
|
@@ -109,37 +109,37 @@ namespace glm
|
|
|
/// @see gtx_quaternion
|
|
/// @see gtx_quaternion
|
|
|
template<typename T, precision P>
|
|
template<typename T, precision P>
|
|
|
GLM_FUNC_DECL vec<3, T, P> rotate(
|
|
GLM_FUNC_DECL vec<3, T, P> rotate(
|
|
|
- tquat<T, P> const & q,
|
|
|
|
|
- vec<3, T, P> const & v);
|
|
|
|
|
|
|
+ tquat<T, P> const& q,
|
|
|
|
|
+ vec<3, T, P> const& v);
|
|
|
|
|
|
|
|
/// Rotates a 4 components vector by a quaternion.
|
|
/// Rotates a 4 components vector by a quaternion.
|
|
|
///
|
|
///
|
|
|
/// @see gtx_quaternion
|
|
/// @see gtx_quaternion
|
|
|
template<typename T, precision P>
|
|
template<typename T, precision P>
|
|
|
GLM_FUNC_DECL vec<4, T, P> rotate(
|
|
GLM_FUNC_DECL vec<4, T, P> rotate(
|
|
|
- tquat<T, P> const & q,
|
|
|
|
|
- vec<4, T, P> const & v);
|
|
|
|
|
|
|
+ tquat<T, P> const& q,
|
|
|
|
|
+ vec<4, T, P> const& v);
|
|
|
|
|
|
|
|
/// Extract the real component of a quaternion.
|
|
/// Extract the real component of a quaternion.
|
|
|
///
|
|
///
|
|
|
/// @see gtx_quaternion
|
|
/// @see gtx_quaternion
|
|
|
template<typename T, precision P>
|
|
template<typename T, precision P>
|
|
|
GLM_FUNC_DECL T extractRealComponent(
|
|
GLM_FUNC_DECL T extractRealComponent(
|
|
|
- tquat<T, P> const & q);
|
|
|
|
|
|
|
+ tquat<T, P> const& q);
|
|
|
|
|
|
|
|
/// Converts a quaternion to a 3 * 3 matrix.
|
|
/// Converts a quaternion to a 3 * 3 matrix.
|
|
|
///
|
|
///
|
|
|
/// @see gtx_quaternion
|
|
/// @see gtx_quaternion
|
|
|
template<typename T, precision P>
|
|
template<typename T, precision P>
|
|
|
GLM_FUNC_DECL mat<3, 3, T, P> toMat3(
|
|
GLM_FUNC_DECL mat<3, 3, T, P> toMat3(
|
|
|
- tquat<T, P> const & x){return mat3_cast(x);}
|
|
|
|
|
|
|
+ tquat<T, P> const& x){return mat3_cast(x);}
|
|
|
|
|
|
|
|
/// Converts a quaternion to a 4 * 4 matrix.
|
|
/// Converts a quaternion to a 4 * 4 matrix.
|
|
|
///
|
|
///
|
|
|
/// @see gtx_quaternion
|
|
/// @see gtx_quaternion
|
|
|
template<typename T, precision P>
|
|
template<typename T, precision P>
|
|
|
GLM_FUNC_DECL mat<4, 4, T, P> toMat4(
|
|
GLM_FUNC_DECL mat<4, 4, T, P> toMat4(
|
|
|
- tquat<T, P> const & x){return mat4_cast(x);}
|
|
|
|
|
|
|
+ tquat<T, P> const& x){return mat4_cast(x);}
|
|
|
|
|
|
|
|
/// Converts a 3 * 3 matrix to a quaternion.
|
|
/// Converts a 3 * 3 matrix to a quaternion.
|
|
|
///
|
|
///
|
|
@@ -160,18 +160,18 @@ namespace glm
|
|
|
/// @see gtx_quaternion
|
|
/// @see gtx_quaternion
|
|
|
template<typename T, precision P>
|
|
template<typename T, precision P>
|
|
|
GLM_FUNC_DECL tquat<T, P> shortMix(
|
|
GLM_FUNC_DECL tquat<T, P> shortMix(
|
|
|
- tquat<T, P> const & x,
|
|
|
|
|
- tquat<T, P> const & y,
|
|
|
|
|
- T const & a);
|
|
|
|
|
|
|
+ tquat<T, P> const& x,
|
|
|
|
|
+ tquat<T, P> const& y,
|
|
|
|
|
+ T const& a);
|
|
|
|
|
|
|
|
/// Quaternion normalized linear interpolation.
|
|
/// Quaternion normalized linear interpolation.
|
|
|
///
|
|
///
|
|
|
/// @see gtx_quaternion
|
|
/// @see gtx_quaternion
|
|
|
template<typename T, precision P>
|
|
template<typename T, precision P>
|
|
|
GLM_FUNC_DECL tquat<T, P> fastMix(
|
|
GLM_FUNC_DECL tquat<T, P> fastMix(
|
|
|
- tquat<T, P> const & x,
|
|
|
|
|
- tquat<T, P> const & y,
|
|
|
|
|
- T const & a);
|
|
|
|
|
|
|
+ tquat<T, P> const& x,
|
|
|
|
|
+ tquat<T, P> const& y,
|
|
|
|
|
+ T const& a);
|
|
|
|
|
|
|
|
/// Compute the rotation between two vectors.
|
|
/// Compute the rotation between two vectors.
|
|
|
/// param orig vector, needs to be normalized
|
|
/// param orig vector, needs to be normalized
|
|
@@ -180,8 +180,8 @@ namespace glm
|
|
|
/// @see gtx_quaternion
|
|
/// @see gtx_quaternion
|
|
|
template<typename T, precision P>
|
|
template<typename T, precision P>
|
|
|
GLM_FUNC_DECL tquat<T, P> rotation(
|
|
GLM_FUNC_DECL tquat<T, P> rotation(
|
|
|
- vec<3, T, P> const & orig,
|
|
|
|
|
- vec<3, T, P> const & dest);
|
|
|
|
|
|
|
+ vec<3, T, P> const& orig,
|
|
|
|
|
+ vec<3, T, P> const& dest);
|
|
|
|
|
|
|
|
/// Build a look at quaternion based on the default handedness.
|
|
/// Build a look at quaternion based on the default handedness.
|
|
|
///
|
|
///
|
|
@@ -189,8 +189,8 @@ namespace glm
|
|
|
/// @param up Up vector, how the camera is oriented. Typically (0, 1, 0).
|
|
/// @param up Up vector, how the camera is oriented. Typically (0, 1, 0).
|
|
|
template<typename T, precision P>
|
|
template<typename T, precision P>
|
|
|
GLM_FUNC_DECL tquat<T, P> quatLookAt(
|
|
GLM_FUNC_DECL tquat<T, P> quatLookAt(
|
|
|
- tvec3<T, P> const & direction,
|
|
|
|
|
- tvec3<T, P> const & up);
|
|
|
|
|
|
|
+ vec<3, T, P> const& direction,
|
|
|
|
|
+ vec<3, T, P> const& up);
|
|
|
|
|
|
|
|
/// Build a right-handed look at quaternion.
|
|
/// Build a right-handed look at quaternion.
|
|
|
///
|
|
///
|
|
@@ -198,8 +198,8 @@ namespace glm
|
|
|
/// @param up Up vector, how the camera is oriented. Typically (0, 1, 0).
|
|
/// @param up Up vector, how the camera is oriented. Typically (0, 1, 0).
|
|
|
template<typename T, precision P>
|
|
template<typename T, precision P>
|
|
|
GLM_FUNC_DECL tquat<T, P> quatLookAtRH(
|
|
GLM_FUNC_DECL tquat<T, P> quatLookAtRH(
|
|
|
- tvec3<T, P> const & direction,
|
|
|
|
|
- tvec3<T, P> const & up);
|
|
|
|
|
|
|
+ vec<3, T, P> const& direction,
|
|
|
|
|
+ vec<3, T, P> const& up);
|
|
|
|
|
|
|
|
/// Build a left-handed look at quaternion.
|
|
/// Build a left-handed look at quaternion.
|
|
|
///
|
|
///
|
|
@@ -208,8 +208,8 @@ namespace glm
|
|
|
/// @param up Up vector, how the camera is oriented. Typically (0, 1, 0).
|
|
/// @param up Up vector, how the camera is oriented. Typically (0, 1, 0).
|
|
|
template<typename T, precision P>
|
|
template<typename T, precision P>
|
|
|
GLM_FUNC_DECL tquat<T, P> quatLookAtLH(
|
|
GLM_FUNC_DECL tquat<T, P> quatLookAtLH(
|
|
|
- tvec3<T, P> const & direction,
|
|
|
|
|
- tvec3<T, P> const & up);
|
|
|
|
|
|
|
+ vec<3, T, P> const& direction,
|
|
|
|
|
+ vec<3, T, P> const& up);
|
|
|
|
|
|
|
|
/// Returns the squared length of x.
|
|
/// Returns the squared length of x.
|
|
|
///
|
|
///
|