I have a scene with a few lights and I want to move the camera: I want to translate about the axes and to rotate the camera about the look at vector.
To implement translations of the camera do I just do
a gltranslate? How to do the rotation about the look at vector? Do I need to push and pop? (I want to move the lights with the camera)
Originally posted by mikemor:
[b]I have a scene with a few lights and I want to move the camera: I want to translate about the axes and to rotate the camera about the look at vector.
To implement translations of the camera do I just do
a gltranslate? How to do the rotation about the look at vector? Do I need to push and pop? (I want to move the lights with the camera)
eye_x,eye_y,eye_z = coordinates of your eye.
obj_x,obj_y,obj_z = where u look at.
up_x,up_y,up_z = which direction is up. Normally the Up value is 0,1,0. It’s meants that the camera always look infront.
u can refer to red book for more detail.(page 119).