Skip to main content
gamedev.net
🔒 Locked

gluLookAt

Started by chewbo Sep 14, 2006 at 12:03 PM 0 replies 700+ views
Original Post
chewbo
chewbo
Hi I have a question about gluLookAt. O.k. I have the function anb the first three values give me the position of my camera The second three values say where I lokk at and the last three arguments give the normal vector of the camera. I hope it is correct so far. So here is my question. With the first 6 Argumens I give in my opinion a clear direction of the view. And I cannot figure out for what I need the normalvector. this vector results from the other two vectors because it is orthogonal. MFG chewbo
Kalidor
Kalidor
Quote:
Original post by chewbo
Hi I have a question about gluLookAt.
O.k. I have the function anb the first three values give me the position of my camera
The second three values say where I lokk at
and the last three arguments give the normal vector of the camera.

I hope it is correct so far.

So here is my question. With the first 6 Argumens I give in my opinion a clear direction of the view. And I cannot figure out for what I need the normalvector. this vector results from the other two vectors because it is orthogonal.


MFG
chewbo
The first three and second three arguments give two points, not vectors. The last three give an up vector. Internally gluLookAt calculates the forward vector from the eye point to the center point (ie: the first six parameters only give one vector and the camera's position in space, which isn't enough to construct a coordinate system). It then calculates a side vector by taking the cross product of the forward vector and the up vector. Then it calculates the true up vector by taking the cross product of the side and forward vectors.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.