9 #ifndef GlobeEngine_VRCommon_h
10 #define GlobeEngine_VRCommon_h
12 #include "OpenGL_Includes.h"
14 #include <vmmlib/matrix.hpp>
18 static vmml::Matrix4f getMat4fForHmdMat34(
const vr::HmdMatrix34_t &matPose)
20 vmml::Matrix4f res = vmml::Matrix4f::IDENTITY;
21 res[0][0] = matPose.m[0][0];
22 res[1][0] = matPose.m[1][0];
23 res[2][0] = matPose.m[2][0];
25 res[0][1] = matPose.m[0][1];
26 res[1][1] = matPose.m[1][1];
27 res[2][1] = matPose.m[2][1];
29 res[0][2] = matPose.m[0][2];
30 res[1][2] = matPose.m[1][2];
31 res[2][2] = matPose.m[2][2];
33 res[0][3] = matPose.m[0][3];
34 res[1][3] = matPose.m[1][3];
35 res[2][3] = matPose.m[2][3];
40 static vmml::Matrix4f getMat4fForHmdMat44(
const vr::HmdMatrix44_t &matPose)
42 vmml::Matrix4f res = vmml::Matrix4f::IDENTITY;
43 res[0][0] = matPose.m[0][0];
44 res[1][0] = matPose.m[1][0];
45 res[2][0] = matPose.m[2][0];
46 res[3][0] = matPose.m[3][0];
47 res[0][1] = matPose.m[0][1];
48 res[1][1] = matPose.m[1][1];
49 res[2][1] = matPose.m[2][1];
50 res[3][1] = matPose.m[3][1];
51 res[0][2] = matPose.m[0][2];
52 res[1][2] = matPose.m[1][2];
53 res[2][2] = matPose.m[2][2];
54 res[3][2] = matPose.m[3][2];
55 res[0][3] = matPose.m[0][3];
56 res[1][3] = matPose.m[1][3];
57 res[2][3] = matPose.m[2][3];
58 res[3][3] = matPose.m[3][3];
Definition: VRCommon.h:17