Android VR Toolkit - HeadTransform getHeadView matrix representation

社会主义新天地 提交于 2019-12-22 00:13:15

问题


I'm starting with Android VR-Toolkit for google cardboard. I use the sample at google website: https://developers.google.com/cardboard/get-started

I new with openGL and try to figure out how the values are represented by the system. For example HeadTransform.getHeadView set a 4x4 matrix and according to the documentation:

A matrix representing the transform from the camera to the head. Head origin is defined as the center point between the two eyes.

My question is what represents every value (each cell) in the matrix?


回答1:


Google Cardboard 's headTransform.getHeadView() provide a transform matrix holding bothrotation and translation transforms (of the head).

Here is the matrix layout (column major order)

Rxx Ryx Rzx x
Rxy Ryy Rzy y
Rxz Ryz Rzz z
0    0    0 1
  • [x, y, z] is the translation matrix. The vector is [0,0,0] in my tests.
  • [Rxx, Rxy, Rxz] is the x axis after the rotation (replace Rx by Ry for the Y axis and so on).



回答2:


If you are new in OpenGL maybe vr toolkit is not the best place to start learning opengl.

You could find this interesting ftp://ftp.informatik.hu-berlin.de/pub3/Linux/Qt/QT/developerguides/qtopengltutorial/OpenGLTutorial.pdf



来源:https://stackoverflow.com/questions/25085108/android-vr-toolkit-headtransform-getheadview-matrix-representation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!