Graphics 版 (精华区)

发信人: jun (☆子夜☆), 信区: Graphics
标  题: 又一个opengl问题。
发信站: 哈工大紫丁香 (Sat Jan  9 11:20:14 1999), 转信

 视变换和模型变换有没有明显的界限?
 我看redbook中的例子,好象没有指明两者的界限。
那对于每次画图前开始的glTranslated()
glRotated(),到底是对哪个起作用?
也就是说,到底是将模型还是将视点作乐改变?
谢谢!

--
※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: 166.111.33.119]

--
☆ 来源:.哈工大紫丁香 bbs.hit.edu.cn.[FROM: sunup.bbs@bbs.net.ts]
发信人: jun (☆子夜☆), 信区: Graphics
标  题: Re: 又一个opengl问题。
发信站: 哈工大紫丁香 (Sat Jan  9 11:20:41 1999), 转信

【 在 airneed (空谷) 的大作中提到: 】

:  视变换和模型变换有没有明显的界限?
:  我看redbook中的例子,好象没有指明两者的界限。
: 那对于每次画图前开始的glTranslated()
: glRotated(),到底是对哪个起作用?
: 也就是说,到底是将模型还是将视点作乐改变?
: 谢谢!

我的心得:
资料上说,二者是相对的,动相机就等于反向动物体。我认为
好象是在glMatrixMode(GL_PROJECTION)之后的变换是对于相机
而言的,而在glMatrixModel(GL_MODELVIEW)之后的变换是对于
物体的。因此在编程中,对相机的变换我都是这样人为分开的,
好象是对的。对于复杂的场景(既有物体运动也有相机运动)应该
这样分一下,要不就太乱了。

另:不知你的红皮书是第几版?能否借我COPY一下?

--
※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: 202.99.34.236] 

--
☆ 来源:.哈工大紫丁香 bbs.hit.edu.cn.[FROM: sunup.bbs@bbs.net.ts]
发信人: jun (☆子夜☆), 信区: Graphics
标  题: Re: 又一个opengl问题。
发信站: 哈工大紫丁香 (Sat Jan  9 11:20:44 1999), 转信

【 在 airneed (空谷) 的大作中提到: 】

:  视变换和模型变换有没有明显的界限?
:  我看redbook中的例子,好象没有指明两者的界限。
: 那对于每次画图前开始的glTranslated()
: glRotated(),到底是对哪个起作用?
: 也就是说,到底是将模型还是将视点作乐改变?
: 谢谢!

我的心得:
资料上说,二者是相对的,动相机就等于反向动物体。我认为
好象是在glMatrixMode(GL_PROJECTION)之后的变换是对于相机
而言的,而在glMatrixModel(GL_MODELVIEW)之后的变换是对于
物体的。因此在编程中,对相机的变换我都是这样人为分开的,
好象是对的。对于复杂的场景(既有物体运动也有相机运动)应该
这样分一下,要不就太乱了。

另:不知你的红皮书是第几版?能否借我COPY一下?我在北京。

--
※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: 202.99.34.236] 

--
☆ 来源:.哈工大紫丁香 bbs.hit.edu.cn.[FROM: sunup.bbs@bbs.net.ts]
发信人: jun (☆子夜☆), 信区: Graphics
标  题: Re: 又一个opengl问题。
发信站: 哈工大紫丁香 (Sat Jan  9 11:22:33 1999), 转信

【 在 airneed (空谷) 的大作中提到: 】
:  视变换和模型变换有没有明显的界限?
:  我看redbook中的例子,好象没有指明两者的界限。
: 那对于每次画图前开始的glTranslated()
: glRotated(),到底是对哪个起作用?
: 也就是说,到底是将模型还是将视点作乐改变?
: 谢谢!
In fact, the MODELVIEW matrix and PROJECTION matrix is two matrix. The first one
is used to define the model and view matrix. There are no difference between
the two transform. If you think the transform is used to camera, the transform 
is the view, if you think it is used to model, it is model transform. Of course
, the order of the two transform is reverse. 
The projection matrix is used to define the view area. So in my mind, if possible,
just use glOrtho and glFrustum under the PROJECTION matrix and define the position
of the camera in MODELVIEW matrix.

--
           Am I wrong to be hurt
           Am I wrong to feel pain
           Am I wrong to be in the rain
           Am I wrong to wish the night won't end
           Am I wrong to cry
           But I know  It's not worng to sing the last song

※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: 166.111.68.238]

--
☆ 来源:.哈工大紫丁香 bbs.hit.edu.cn.[FROM: sunup.bbs@bbs.net.ts]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:3.183毫秒