PDA

View Full Version : Change the origin



03-07-2005, 05:00 AM
Hello to everybody,

I would like to know how can I use the mouse in order to change the reference point of the origin
with a click in a specific point on the screen.To be more specific,I have already managed to draw some cubes and I want to look around them,but every time I try to rotate using the mouse the picture rotates only around the point (0,0,0).Can anybody help me?
Thanks in advance!

dvm
03-08-2005, 04:52 PM
Well, you could use gluLookAt, to position your camera exactly where you want her.

03-08-2005, 11:53 PM
Firstly,thanks for your reply!!

I have already read the glLookAt in an opengl tutorial,but I don't know what values(a,b,c) I should use for the origin in
glLookAt(0,0,5
a,b,c,
0,1,0)
in order to connect the moving of the mouse with the rotation around the origin.I suggest that it should be something likes point.x but I haven't managed to make it work.