Jump to content
  • Advertisement
Sign in to follow this  
B5TACKIN

OpenGL eyeX,Y,Z / centerX,Y,Z / upX,Y,Z

This topic is 3875 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

I have a final tomorrow, can someone tell me what the purpose of eyeX,Y,Z / centerX,Y,Z / upX,Y,Z are in the gluLookAt command in OpenGL. Respond ASAP Thanks

Share this post


Link to post
Share on other sites
Advertisement
eyeX,Y,Z / centerX,Y,Z / upX,Y,Z

the first three are the position vector of the observer's eye,
the second three are the point at which the eye is looking at (the center of the scene), and the upX, Y, Z are the coordinates of the up vector, which typically points up (along positive Y), so it's {0.0, 1.0, 0.0} in most cases (it must not be parallel to the line of sight from the eye to the point it's looking at)

Share this post


Link to post
Share on other sites
To elaborate a little on what wlw_wl said, the up vector, if I recall correctly, defines the camera's sense of "up", and through it, the camera's roll.

For example, an up vector that points to one side should produce a camera that is viewing the scene sideways.

Share this post


Link to post
Share on other sites
Quote:
Original post by Thaumaturge
To elaborate a little on what wlw_wl said, the up vector, if I recall correctly, defines the camera's sense of "up", and through it, the camera's roll.

For example, an up vector that points to one side should produce a camera that is viewing the scene sideways.


isn't it yaw, actually? It's the vector around which the scene will be rotated to simulate the camera position, as described here

Share this post


Link to post
Share on other sites
Quote:
Original post by wlw_wl
Quote:
Original post by Thaumaturge
To elaborate a little on what wlw_wl said, the up vector, if I recall correctly, defines the camera's sense of "up", and through it, the camera's roll.

For example, an up vector that points to one side should produce a camera that is viewing the scene sideways.


isn't it yaw, actually? It's the vector around which the scene will be rotated to simulate the camera position, as described here

You are both correct but talking about different things. Changing the up-vector will roll the viewpoint. Rotating about the up-vector is yaw.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!