PDA

View Full Version : gluLookAt(675.0, 345.0, -1287.557, 675.0, 345.0, 1, 0, -1, 0) and pitch,yaw,roll



zydgyy
05-29-2012, 06:19 AM
how can i get these three componets through this function call?

tonyo_au
05-29-2012, 07:09 PM
you can use



GLfloat matrix[16];
glGetFloatv (GL_MODELVIEW_MATRIX, matrix);

to fetch the matrix created via gluLookAt
and then extra the pitch, yaw, roll from this (search the web if you don't know how to do this)