samedi 28 février 2015

OpenGl GluLookAt to GlRotated and GlTranslated


Vote count:

0




Actually, I try to solve a little problem and I dont understand how this GluLookAt works in OpenGl.


I would like to know how to transform this two lines :



gluLookAt(5.0, 15.0, 2.0, 0.0, 0.0, 0.0, 1.0, 0.0, -1.0);
gluLookAt(5.0, 0.0, 5.0, 0.0, 0.0, 0.0, 1.0, -1.0, 0.0);


using glRotatef and glTranslatef.


After some searches, it seems to exist a way for making that thing :



glRotatef();
glRotatef();
glTranslatef(5.0,15.0,2.0);

glRotatef();
glRotatef();
glTranslatef(5.0,0.0,5.0);


So just by using two rotations and one translation. But I dont understand how can i find the angles and the axes of these rotations.


Ty in advance. I start becoming crazy with these rotations.



asked 1 min ago







OpenGl GluLookAt to GlRotated and GlTranslated

Aucun commentaire:

Enregistrer un commentaire