【发布时间】:2012-02-10 21:21:54
【问题描述】:
我正在更深入地了解矩阵实现,我在 OpenSceneGraph 矩阵逆计算中发现了以下评论:
We note that this matrix can be split into three matrices.
mat = rot * trans * corr, where rot is rotation part, trans is translation part, and corr is the correction due to perspective (if any).
modelview矩阵分解成矩阵旋转和平移看起来是合理的,但是校正矩阵让我很好奇……
corr 矩阵是重置为单位的模型视图矩阵,除了第四行(使用 OpenGL 表示法)。例如:
corr = [ 1 0 0 0
0 1 0 0
0 0 1 0
x y z s ]
通常,向量c=[x y z s] 等于{0 0 0 1},实际上它对顶点变换没有贡献。但是,既然都涉及到了,那么校正向量是怎么用的呢?
c校正向量的具体应用有哪些?使用这样的矩阵(具有透视校正)对转换后的顶点有什么影响?
【问题讨论】: