Full freedom of movement without 'gimbal lock'

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
AW111
Posts: 82
Joined: Fri Jul 16, 2010 4:49 pm

Post by AW111 »

I've looked over Irrlicht's Quaternion library, but it's barely documented. I assume the variables X,Y,Z (capital letters) define the direction the user is facing (e.g. 0,1,0 would be straight up) and W is the rotation around this axis (the degree of "banking" if it's an airplane ) ? But when using "set" with Euler angles, the lowercase x,y, and z represent angles, presumably x = roll, y = pitch, and z = yaw?
And to convert back again once the quat functions have done their obscure magic, you use toAngleAxis() (which returns a vector plus "banking" angle?) and toEuler() (returns roll,pitch,yaw) ?
Or am I misinterpreting everything? The documentation is rather sparse...
In any event, one concern I have with using quaternions is speed -- you need to convert back and forth between two sets of numbers and have the functions perform a lot of math - rather than just using simple trig calculations plus some bounds checking for the angles which cause problems. Isn't the latter a lot faster? And can't you perform just a simple check and adjustment for the problematic angles?
lazerblade
Posts: 194
Joined: Thu Mar 18, 2010 3:31 am
Contact:

Post by lazerblade »

Kicks ground... :roll:


I've never used quats, I've only heard of them. :lol:
LazerBlade

When your mind is racing, make sure it's not racing in a circle.

3d game engine: http://sites.google.com/site/lazerbladegames/home/ray3d
lazerBlade blog: http://lazerbladegames.blogspot.com/
Post Reply