View Full Version : yaw, pitch, roll besides x, y, z

Bob Plugge

10-30-2000, 05:31 AM

I hate gimball locks and many with me. http://www.opengl.org/discussion_boards/ubb/frown.gif

It would be great to have a function that can rotate the position of objects and cameras in euler angles and have no problems with it.

Wouldn't it be great to have everything and no problems? Use Euler angles wisely and Gimbal lock won't occur, or find another method that also does what you want.

Bob Plugge

10-30-2000, 02:48 PM

Hey, if you want to make OpenGL easyer to use, make it easyer to use... !

http://www.opengl.org/discussion_boards/ubb/confused.gif

pop_n_fresh

10-31-2000, 06:54 PM

I agree with Bob, glEnable( GL_IGNORE_INCONVENIENT_LAWS_OF_MATHEMATICS ) would be great.

Bob Plugge

11-01-2000, 12:42 AM

Yeah, or rotate something like this:

glMatrixMode(GL_MODELVIEW);

glLoadIdentity();

glEnable(GL_EULER_ANGLES);

glRotateViewpointf(yaw,pitch,roll);

glTranslatef(-x, -y, -z);

glRotateGeometryf(yaw,pitch,roll);

// Draw some stuff.

http://www.opengl.org/discussion_boards/ubb/rolleyes.gif

It's possible to make your own matrix, and add it to OpenGL. Do a symbolic multiplication on your own (or find one on the net) of your yaw, pitch and roll matrices, in proper order ofcourse. The resulting matrix will be a symbolic matrix too, where you, in your code, insert your rotationvalues. Then add it to OpenGL with either glMultMatrix or glLoadMatrix. Works great.

Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.