Sign in to follow this  

gluLookAt

This topic is 4108 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 4108 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this