View Full Version : gluLookAt() parameters
08-21-2000, 09:28 AM
According to the July 2000 MSDN library, the gluLookAt function has three sets of xyz parameters - the eye point, the center point, and the up vector. This does not make sense because I thought one should be a position/center point, another the "look at" vector, and the third the "look up" vector. Which is the look at vector, the eye point (first xyz), or the center point (the second xyz, or do I have this all wrong?
The Eye point is where the camera is located. The Center point is where the center of the lens is pointed and the "look up" vector is which was is up http://www.opengl.org/discussion_boards/ubb/smile.gif
Envision (sp?) a 35mm camera sitting in front of your head, you are looking through it. The eye vector is where the lens of the camera is (the point where the picture will be snapped). You are pointing the camera at an apple on your desk directly in front of you. The center vector is the center of the apple. The up vector points straight at the ceiling above you (because you want to take a picture of the apple dead-on). If you wanted an upside down picture of the apple, the up vector would point straight down at the floor.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.