Fixed error of aiQuaterniont::Rotate()

The function rotates a point to opposite direction.
Conjugate() should be applied to inverse of the quaternion.
pull/446/head
yeonseok-yi 2015-01-26 21:09:54 +09:00
parent cc346d3e12
commit 1bdb31f8aa
1 changed files with 1 additions and 2 deletions

View File

@ -273,11 +273,10 @@ template<typename TReal>
inline aiVector3t<TReal> aiQuaterniont<TReal>::Rotate (const aiVector3t<TReal>& v)
{
aiQuaterniont q2(0.f,v.x,v.y,v.z), q = *this, qinv = q;
q.Conjugate();
qinv.Conjugate();
q = q*q2*qinv;
return aiVector3t<TReal>(q.x,q.y,q.z);
}
#endif