OpenGL Rotation

后端 未结 6 1408
-上瘾入骨i
-上瘾入骨i 2021-02-14 11:33

I\'m trying to do a simple rotation in OpenGL but must be missing the point. I\'m not looking for a specific fix so much as a quick explanation or link that explains OpenGL rota

6条回答
  •  清歌不尽
    2021-02-14 11:50

    Regarding Projection matrix, you can find a good source to start with here:

    http://msdn.microsoft.com/en-us/library/bb147302(VS.85).aspx

    It explains a bit about how to construct one type of projection matrix. Orthographic projection is the very basic/primitive form of such a matrix and basically what is does is taking 2 of the 3 axes coordinates and project them to the screen (you can still flip axes and scale them but there is no warp or perspective effect).

    transformation of matrices is most likely one of the most important things when rendering in 3D and basically involves 3 matrix stages:

    • Transform1 = Object coordinates system to World (for example - object rotation and scale)
    • Transform2 = World coordinates system to Camera (placing the object in the right place)
    • Transform3 = Camera coordinates system to Screen space (projecting to screen)

    Usually the 3 matrix multiplication result is referred to as the WorldViewProjection matrix (if you ever bump into this term), since it transforms the coordinates from Model space through World, then to Camera and finally to the screen representation.

    Have fun

提交回复
热议问题