Merge branch '0.9.3' of github.com:Groovounet/glm into 0.9.3

This commit is contained in:
Christophe Riccio
2012-04-06 13:53:14 +01:00
5 changed files with 25 additions and 16 deletions

View File

@@ -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

View File

@@ -31,6 +31,12 @@
namespace glm{
namespace detail
{
template <typename T>
GLM_FUNC_QUALIFIER typename tquat<T>::size_type tquat<T>::length() const
{
return 4;
}
template <typename T>
GLM_FUNC_QUALIFIER tquat<T>::tquat() :
x(0),
@@ -494,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
(