Z coordinate and viewer in openGL

I am confused with the amount of view generated by glOrtho . I know that the last two parameters are for the Z axis, the first is the distance between the viewer and the near plane, and the second is the distance between the viewer and the background.

My question is, where is the viewer (camera) located exactly in the Z coordinate?

and in this program link some code that makes the almost flat positive and negative plane negative, in this case we can say that Z-is behind the viewer, and Z + is in front of the viewer?

if yes, try to make the Z-coordinate negative for the entire vertex of one of the triangles, you will notice that it appears, although it is behind the viewer, why?

0
source share
2 answers

first we represent the distance between the viewer and the near plane, and the second is the distance between the viewer and the background

No, it is not. Spelling projection defines the field. ZNear and zFar are field positions, not the distance from the "viewer".

Spelling projections do not have a “viewer” as well as forward-looking forecasts. They have a gaze, not a gaze. And the line of sight is always the direction that puts zFar further, and zNear closest. If zNear is greater than zFar, then the direction of vision is in positive Z; otherwise it is negative Z.

+4
source

Actually your question is a bit confusing. I think you can try glLookAt () and make the object visible from a different angle and see the difference. here is the link http://mycodelog.com/2010/05/28/glcamera/

0
source

Source: https://habr.com/ru/post/1502518/


All Articles