问题
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