Как определить ориентацию камеры? ⇐ IOS
-
Гость
Как определить ориентацию камеры?
I'm currently working on an application using Vuforia and I need to retrieve the camera direction from a 4x4 transformation matrix. I've already retrieved the position from the deviceMatrix.
VuMatrix44F modelView = vuMatrix44FMultiplyMatrix(renderState.viewMatrix, poseInfo.pose); VuMatrix44F deviceMatrix = vuMatrix44FInverse(modelView) ;` I used the vuMatrix44FGetPoseRot function to extract the rotation. However, the rotation values obtained by this method don't seem to match the expected behavior.
Here's the code used:
vuMatrix44FGetPoseRot(deviceMatrix, &translation, &rotationAxis, &rotationAngle); float pitch = rotationAxis.data[0]; float yaw = rotationAxis.data[1]; float roll = rotationAxis.data[2]; How do I determine the camera's orientation?
Thank you
Источник: https://stackoverflow.com/questions/781 ... rientation
I'm currently working on an application using Vuforia and I need to retrieve the camera direction from a 4x4 transformation matrix. I've already retrieved the position from the deviceMatrix.
VuMatrix44F modelView = vuMatrix44FMultiplyMatrix(renderState.viewMatrix, poseInfo.pose); VuMatrix44F deviceMatrix = vuMatrix44FInverse(modelView) ;` I used the vuMatrix44FGetPoseRot function to extract the rotation. However, the rotation values obtained by this method don't seem to match the expected behavior.
Here's the code used:
vuMatrix44FGetPoseRot(deviceMatrix, &translation, &rotationAxis, &rotationAngle); float pitch = rotationAxis.data[0]; float yaw = rotationAxis.data[1]; float roll = rotationAxis.data[2]; How do I determine the camera's orientation?
Thank you
Источник: https://stackoverflow.com/questions/781 ... rientation
Мобильная версия