MCPcopy Create free account
hub / github.com/ValveSoftware/openvr / GetHMDMatrixPoseEye

Method GetHMDMatrixPoseEye

samples/hellovr_vulkan/hellovr_vulkan_main.cpp:3175–3189  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Purpose: Gets an HMDMatrixPoseEye with respect to nEye. -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

3173// Purpose: Gets an HMDMatrixPoseEye with respect to nEye.
3174//-----------------------------------------------------------------------------
3175Matrix4 CMainApplication::GetHMDMatrixPoseEye( vr::Hmd_Eye nEye )
3176{
3177 if ( !m_pHMD )
3178 return Matrix4();
3179
3180 vr::HmdMatrix34_t matEyeRight = m_pHMD->GetEyeToHeadTransform( nEye );
3181 Matrix4 matrixObj(
3182 matEyeRight.m[0][0], matEyeRight.m[1][0], matEyeRight.m[2][0], 0.0,
3183 matEyeRight.m[0][1], matEyeRight.m[1][1], matEyeRight.m[2][1], 0.0,
3184 matEyeRight.m[0][2], matEyeRight.m[1][2], matEyeRight.m[2][2], 0.0,
3185 matEyeRight.m[0][3], matEyeRight.m[1][3], matEyeRight.m[2][3], 1.0f
3186 );
3187
3188 return matrixObj.invert();
3189}
3190
3191//-----------------------------------------------------------------------------
3192// Purpose: Gets a Current View Projection Matrix with respect to nEye,

Callers

nothing calls this directly

Calls 2

Matrix4Class · 0.85
GetEyeToHeadTransformMethod · 0.45

Tested by

no test coverage detected