----------------------------------------------------------------------------- Purpose: Gets an HMDMatrixPoseEye with respect to nEye. -----------------------------------------------------------------------------
| 3173 | // Purpose: Gets an HMDMatrixPoseEye with respect to nEye. |
| 3174 | //----------------------------------------------------------------------------- |
| 3175 | Matrix4 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, |
nothing calls this directly
no test coverage detected