[OpenGL] Three, OpenGL summary: OpenGL coordinate system

Right-handed System (Right-handed System)

  By convention, OpenGL is a right-handed coordinate system. To put it simply, the positive x-axis is on your right hand side, the positive y-axis is facing upwards, and the positive z-axis is facing backwards. Imagine that your screen is in the center of the three axes, and the positive z-axis passes through your screen towards you. The coordinate system is drawn as follows:

coordinate_systems_right_handed

In order to understand why it is called a right-handed coordinate system, follow the steps below:

Extend your right arm along the positive y axis and point your finger upward.

  • The thumb points to the right.
  • Point your index finger upward.
  • The middle point is bent down 90 degrees.

  If your actions are correct, then your thumb is pointing in the positive x-axis direction, your index finger is pointing in the positive y-axis direction, and your middle finger is pointing in the positive z-axis direction. If you use your left arm to do these movements, you will find that the direction of the z axis is opposite. This is called the left-handed coordinate system, and it is widely used by DirectX. Note that in the standardized device coordinate system, OpenGL actually uses the left-handed coordinate system (the projection matrix exchanges the left and right hands).

OpenGL coordinates: Note that in the standardized device coordinate system, OpenGL actually uses the left-handed coordinate system (the projection matrix exchanges the left and right hands).
Insert picture description here

The right hand department of high school mathematics:
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_42820594/article/details/107845805