mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 18:24:35 +00:00
Promote eulerAngles to GTC quaternion extension
This commit is contained in:
parent
fa84c6d1b0
commit
7373e7b8da
@ -204,6 +204,13 @@ namespace detail
|
||||
typename detail::tquat<T>::value_type const & angle,
|
||||
detail::tvec3<T> const & v);
|
||||
|
||||
/// Returns euler angles, yitch as x, yaw as y, roll as z.
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
template <typename T>
|
||||
detail::tvec3<T> eulerAngles(
|
||||
detail::tquat<T> const & x);
|
||||
|
||||
/// Converts a quaternion to a 3 * 3 matrix.
|
||||
///
|
||||
/// @see gtc_quaternion
|
||||
|
@ -500,6 +500,15 @@ namespace detail
|
||||
//return gtc::quaternion::cross(q, detail::tquat<T>(cos(AngleRad * T(0.5)), Tmp.x * fSin, Tmp.y * fSin, Tmp.z * fSin));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER detail::tvec3<T> eulerAngles
|
||||
(
|
||||
detail::tquat<T> const & x
|
||||
)
|
||||
{
|
||||
return detail::tvec3<T>(pitch(x), yaw(x), roll(x));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER detail::tmat3x3<T> mat3_cast
|
||||
(
|
||||
|
@ -177,12 +177,6 @@ namespace glm
|
||||
valType yaw(
|
||||
detail::tquat<valType> const & x);
|
||||
|
||||
//! Returns euler angles, yitch as x, yaw as y, roll as z.
|
||||
//! From GLM_GTX_quaternion extension.
|
||||
template <typename valType>
|
||||
detail::tvec3<valType> eulerAngles(
|
||||
detail::tquat<valType> const & x);
|
||||
|
||||
//! Converts a quaternion to a 3 * 3 matrix.
|
||||
//! From GLM_GTX_quaternion extension.
|
||||
template <typename valType>
|
||||
|
@ -234,15 +234,6 @@ namespace glm
|
||||
return glm::degrees(asin(valType(-2) * (q.x * q.z - q.w * q.y)));
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tvec3<valType> eulerAngles
|
||||
(
|
||||
detail::tquat<valType> const & x
|
||||
)
|
||||
{
|
||||
return detail::tvec3<valType>(pitch(x), yaw(x), roll(x));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER detail::tquat<T> shortMix
|
||||
(
|
||||
|
Loading…
Reference in New Issue
Block a user