我从适用于 google cardboard 的 Android VR-Toolkit 开始。 我使用谷歌网站上的示例: https://developers.google.com/cardboard/get-started
我是 openGL 新手,并尝试弄清楚系统如何表示这些值。 例如 HeadTransform.getHeadView 设置一个 4x4 矩阵并根据文档:
A matrix representing the transform from the camera to the head. Head origin is defined as the center point between the two eyes.
我的问题是矩阵中的每个值(每个单元格)代表什么?
最佳答案
Google Cardboard 的 headTransform.getHeadView() 提供一个变换矩阵,其中包含(头部)的旋转和平移变换。
这是矩阵布局(列主要顺序)
Rxx Ryx Rzx x
Rxy Ryy Rzy y
Rxz Ryz Rzz z
0 0 0 1
- [x, y, z] 是平移矩阵。在我的测试中向量是 [0,0,0]。
- [Rxx,Rxy,Rxz]是旋转后的x轴(Y轴将Rx替换为Ry,依此类推)。
关于Android VR工具包-HeadTransform getHeadView矩阵表示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25085108/