LookAt Matrix 问题 - 它们何时等价
您能否证实或否认以下我认为正确的说法?
1) 如果对于某个正 k,两个 LookAt 矩阵
glLookAt(eye, center1, up)
和
glLookAt(eye, center2, up)
是等价的如果 center1 - eye == k(center2 - eye)
。
2) 如果 LookAt 矩阵的 eye
向量不同,则它们永远不会相等。
Could you please confirm or deny the following statements which I think are true?
1) Two LookAt matrices
glLookAt(eye, center1, up)
and
glLookAt(eye, center2, up)
are equivalent if center1 - eye == k(center2 - eye)
for some positive k.
2) Tho LookAt matrices are never equivalent if their eye
vector is different.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是正确的。方向向量是从中心-眼睛开始计算的,然后进行归一化,因此如果方向相同,长度并不重要。
但请注意,由于四舍五入,所得矩阵可能存在非常微小的数值差异。但出于所有实际目的,矩阵是相同的。
That is correct. The direction vector is calculated from center - eye, and then normalized, so the length doesn't matter if the direction is the same.
Beware though that there could be very slight numerical differences in the resulting matricies because of rounding. For all practical purposes though, the matricies are the same.