OpenGL 3D Viewing Functions
OpenGL 3D Viewing Functions
OpenGL 3D Viewing Functions
3D VIEWING FUNCTIONS
• Viewing parameters are specified with the following GLU function, which is in the OpenGL Utility
library because it invokes the translation and rotation routines in the basic OpenGL library.
gluLookAt(x0, y0, z0 pref, yref, zref, Vx, Vy, Vz);
• This function designates the origin of the viewing reference frame as the world-coordinate position
PO=(x0,yo,z0)
• The reference position as Pref=(xref, yref, zref),and the view-up vector as V=(Vx, Vy, Vz).
• The positive zview axis for the viewing frame is in the direction N = Po - Pref
• If we do not invoke the gluLookAt function, the default OpenGL viewing parameters are
PO=(0,0,0)
Pref=(0,0,-1)
V=(0,1,0)
OPENGL ORTHOGONAL-PROJECTION FUNCTION