In OpenGL, the modelview matrix is
Eye Coordinates = ModelView Matrix * Object Coordinates = View Matrix * Model Matrix * Object Coordinates;
or
Eye Coordinates = ModelView Matrix * Object Coordinates = Model Matrix * View Matrix * Object Coordinates;
Which one is correct? and Why?
You typically want to move your object from object space into model space. This means that you will transform your object coordinates first with your Model matrix, using
Model Space Coordinates = Model Matrix * Object Space Coordinates [1]
After your object has been transformed into model space, you typically want to transform it into view space (eye space), using:
Eye Coordinates = View Matrix * Model Space coordinates [2]
Ergo, using [1] and [2], we obtain:
Eye Coordinates = View Matrix * Model Matrix * Object Space Coordinates
And thus your first equation is correct.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments