Hello Bryan,
some additional infos for gluLookAt:
gluLookAt(eyex, eyey, eyez, centerx, centery, centerz, upx, upy, upz)
eyeX,eyeY, eyeZ
Specifies the position of the eye point. So it is the position where the
camera ( or the eye ) is located, from where you look (the camera's origin).
By default ( means not changing the camera values with any command ) it is
the coordinate origin point at (0,0,0)
centerX, centerY, centerZ
Specifies the position of the reference point. That means in which direction
the camera will look from the cameras origin. By default the camera will
look down the negative z-axis (0,0,-1)
upX, upY, upZ
Specifies the direction of the up vector and so specify where is upwards and
downwards. By default upwards is in direction of the positive y-axis
(0,1,0). By definition, the camera use a local coordinate system following
the right-hand-rule with the origin in (eyeX,eyeY,eyeZ).
3 vectors ( each stay on the others with 90 degrees ) will build a local
3d-coordinate-system following the right-hand-rule:
thumb -- x-axis (1,0,0)
forefinger -- y-axis (0,1,0)
middle finger -- z-axis (0,0,1)
If you try this at home ;) you will see, that if the palm of the right hand
shows to you: the thumb points to the right, the forefinger straight upwards
and the middle finger to you. This is exactly the default orientation of the
3d-world ( the palm of the hand is the screen ). In my example the camera
will look down the negative z-axis, remember: z-axis -- middle finger,
therefore not straight to you but straight from you into the screen because
of the negative 1. ATTENTION: don't try to put your middle finger in this
direction! It will be break ;)
hope it helps, Jens
|