PDA

View Full Version : Help on transformations



KurtCob
09-12-2000, 01:37 AM
Hello guys!

I'm making an application and I'm using glRotatef, glTranslate ....and so one, using this kind of function, I'm working with rotating the (lets say) the scene, and not taking my data (points, lines...) and applying a matrix to do this, but if I want to export the data (rotated), and simulate in the screen with the OpenGL, I need to apply exactly the same transformation to my vertexes...am I right ???...
So can someone give me help on doing this ? How is the matrix that OpenGL use for rotating, scaling and translating.

And if I'm wrong, and it is possible to do in a easy way, can some one explain me?

Thank you for the moment

Best regards

Kurt

Don't Disturb
09-12-2000, 05:37 AM
Yep, you're correct.
http://mathworld.wolfram.com/ probably has the info on how to multiply matrices.

XBCT
09-12-2000, 05:46 AM
Hi!
Simply get all applied matrices(or all matrices you want) from OpenGL with glGet(GL_????_MATRIX,Matrix) and multiply all vertices with all these matrices...

HTH,XBTC!