Hi! I’m studying how gluPickMatrix works, and make some conclusion, can you see if it is correct? Or if there is any places unclear?
Thank you!
The books and documentation said that gluPickMatrix used with the projection matrix to restrict drawing.
This means that gluPickMatrix’s job is to obtain a restricted part of 3D space. then when drawing is going on, the OpenGL will detect if the drawing is happen in that area and load the name stack if yes.
Let’s consider what we need for gluPickMatrix to defind the restricted volumn of space.
1)projection matrix. This is specified by almost all documentations, books about OpenGL. Because the restricted volumn must be a subset of the volumn defined by projection matrix.
2)Viewport and the picked area of viewport. This is explicitly shown by the fact that they are peremeters of gluPickMatrix.
3)ModelView matrix. View matrix is usually by gluLookAt; model matrix is usually by scalef and so on. They are defined when drawing the primitives.