Yet another Quaternion mystery

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
iso
Halfling
Posts: 73
Joined: Fri Mar 18, 2005 11:43 am
Location: Slovakia

Yet another Quaternion mystery

Post by iso »

I regullary get error in

Quaternion getRotationTo(const Vector3& dest)

when the assert (s != 0 && "Divide by zero!"); realizes, that s = 0.

This happens, when the angle of v0 and v1 is Pi (or -Pi, is the same). So, yes the Quaternion doesn't know how to dicide, wich rotation to take (positive or negative). Can't there be just a hard-coded decision for this case? So, that Ogre wouldn't raise that exception?

Or do I misunderstand something and this rotation (Pi) can't be expressed by a quaternion?
Of course I don't see textures as images. Who would?
User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark
Contact:

Post by DWORD »

Post Reply