Merge branch '0.9.1' into doc

This commit is contained in:
Christophe Riccio
2011-02-05 01:17:15 +00:00
11 changed files with 123 additions and 18 deletions

View File

@@ -79,6 +79,11 @@ namespace glm
detail::tquat<T> operator- (
detail::tquat<T> const & q);
template <typename T>
detail::tquat<T> operator* (
detail::tquat<T> const & q,
detail::tquat<T> const & p);
template <typename T>
detail::tvec3<T> operator* (
detail::tquat<T> const & q,
@@ -145,7 +150,7 @@ namespace glm
//! Returns the cross product of q1 and q2.
//! From GLM_GTC_quaternion extension.
template <typename T>
detail::tquat<T> cross(
GLM_DEPRECATED detail::tquat<T> cross(
detail::tquat<T> const & q1,
detail::tquat<T> const & q2);

View File

@@ -156,6 +156,20 @@ namespace detail{
return detail::tquat<T>(-q.w, -q.x, -q.y, -q.z);
}
template <typename T>
inline detail::tquat<T> operator*
(
detail::tquat<T> const & q,
detail::tquat<T> const & p
)
{
return detail::tquat<T>(
q.w * p.w - q.x * p.x - q.y * p.y - q.z * p.z,
q.w * p.x + q.x * p.w + q.y * p.z - q.z * p.y,
q.w * p.y + q.y * p.w + q.z * p.x - q.x * p.z,
q.w * p.z + q.z * p.w + q.x * p.y - q.y * p.x);
}
// Transformation
template <typename T>
inline detail::tvec3<T> operator*