PDA

View Full Version : Viewing transformations and Coordinates



dvwood
01-29-2009, 08:34 AM
Can someone clarify the difference between these coordinates? Or simply confirm if i understood it correctly?

Object Coordinates = are the vertrices that you get with glVertex*()
Eye Coordinates = the coordinates that you can see in the viewing volume (??) or simply the vertrices that are in the viewing volume.
Clip Coordinates = the coordinates outside of the viewing volume
Window Coordinates = also called Screen Coordinates (or what??), the pixel positions.

From the OpenGL FAQ, it says
Eye Coordinates are transformed by the Projection matrix to produce Clip Coordinates.


why do we need to know about clip coordinates at all?? i mean they are outside of this viewing-volume and can be irrelevant. If an object is cut by the clipping plane, its pretty logic that what is cut is outside and consists basically of clipping coordinates. So i dont understand why eyecoordinates are converted to Clip Coordinates... the sentence to me sounds like, you take what you can see and throw it out of the viewing volume - from eye to clip coordinates. Or did i just misunderstand what eye coordinates are??

Help is much appreciated.
thanks.

Budric
01-29-2009, 11:56 AM
Instead of coordinates those names should read "coordinate systems"
You convert everything from object coordinate system (CS), to world CS, to eye CS to clipping CS to normalized device coordinate system etc, etc to window coordinates which is 2D.

The clipping algorithm is performed in the clipping coordinate system. Until then you don't know what's in and what's out.

dorbie
01-29-2009, 06:15 PM
Here's the corrections:

Object Coordinates = the vertrices that you send with glVertex*()
Eye Coordinates = the coordinates relative to the eye, i.e. after transformation through the MODELVIEW matrix
Clip Coordinates = coordinates after transformation through the PROJECTION matrix, probably before the homogeneous divide by w of the transformed vertices.
Window Coordinates = These are coordinates after viewport transformation, basically screen space coordinates.