相机框架和对象框架 [英] Camera Frame and Object Frame

查看:158
本文介绍了相机框架和对象框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读Interactive Graphics,特别是我开始了关于查看的部分,并且我对这句话不甚了解:


最初,我们将模型视图矩阵设置为单位矩阵,因此相机框架和对象框架是相同的。

我知道什么是模型视图矩阵,并且我知道在这种情况下,摄像机视图面向z轴负向。但我不明白对象框相框之间的区别。

感谢帮助。

解决方案

您有2个矩阵:查看模型其中视图表示您从哪里看以及哪些方向(相机)和模型表示你的对象在哪里以及如何定向你正在渲染的。



然而,为了加速渲染,我们只使用一个累积矩阵: / p>

  ModelView = Inverse(View)* Model 

$例如,当你在 OpenGL 中写这样的内容时:

  glMatrixMode(GL_MODELVIEW); 
glLoadIdentity();

然后查看模型矩阵是相同的并且等于单位矩阵。在此之后,您可以将您的增量旋转和翻译添加到 View (逆顺序和方向),或者添加到 Model 订单和方向)。



更多信息请参阅:



尤其那里的最后3个链接......


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.

解决方案

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:

Especially the last 3 links in there...

这篇关于相机框架和对象框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆