Camera Frame and Object Frame

戏子无情 提交于 2019-12-02 09:09:28

问题


I'm reading about Interactive Graphics , in particular I started the section about the viewing and I did not understand well this sentence :

Initially, we start with the model-view matrix set to an identity matrix, so the camera frame and the object frame are identical.

I know what is a model view matrix and I know that in this case the camera view is oriented in the z negative axis. But I did not understand exactly what is the difference between the object frame and the camera frame.

Thanks for the help.


回答1:


you got 2 matrices: View and Model where View represents where from are you looking and in which directions (camera) and Model represents where is and how oriented your object you are currently rendering is.

However To speed-up rendering we are using just one cumulative matrix so:

ModelView = Inverse(View) * Model

so for example when you write something like this in OpenGL:

glMatrixMode(GL_MODELVIEW);
glLoadIdentity();

Then both View and Model matrices are identical and equal to unit matrix. After this point you add your incremental rotations and translations either to View (inverse order and direction) or to Model (normal order and direction).

For more info see:

  • Understanding 4x4 homogenous transform matrices

Especially the last 3 links in there...



来源:https://stackoverflow.com/questions/49840021/camera-frame-and-object-frame

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!