|
|
@ -331,9 +331,9 @@ public class OSVR implements VRAPI { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Quaternion getOrientation() { |
|
|
|
public Quaternion getOrientation() { |
|
|
|
storeRot.set((float)hmdPose.rotation.data[1], |
|
|
|
storeRot.set((float)-hmdPose.rotation.data[1], |
|
|
|
(float)hmdPose.rotation.data[2], |
|
|
|
(float)hmdPose.rotation.data[2], |
|
|
|
(float)hmdPose.rotation.data[3], |
|
|
|
(float)-hmdPose.rotation.data[3], |
|
|
|
(float)hmdPose.rotation.data[0]); |
|
|
|
(float)hmdPose.rotation.data[0]); |
|
|
|
if( storeRot.equals(Quaternion.ZERO) ) storeRot.set(Quaternion.DIRECTION_Z); |
|
|
|
if( storeRot.equals(Quaternion.ZERO) ) storeRot.set(Quaternion.DIRECTION_Z); |
|
|
|
return storeRot; |
|
|
|
return storeRot; |
|
|
@ -352,9 +352,9 @@ public class OSVR implements VRAPI { |
|
|
|
storePos.x = (float)-hmdPose.translation.data[0]; |
|
|
|
storePos.x = (float)-hmdPose.translation.data[0]; |
|
|
|
storePos.y = (float)hmdPose.translation.data[1]; |
|
|
|
storePos.y = (float)hmdPose.translation.data[1]; |
|
|
|
storePos.z = (float)-hmdPose.translation.data[2]; |
|
|
|
storePos.z = (float)-hmdPose.translation.data[2]; |
|
|
|
storeRot.set((float)hmdPose.rotation.data[1], |
|
|
|
storeRot.set((float)-hmdPose.rotation.data[1], |
|
|
|
(float)hmdPose.rotation.data[2], |
|
|
|
(float)hmdPose.rotation.data[2], |
|
|
|
(float)hmdPose.rotation.data[3], |
|
|
|
(float)-hmdPose.rotation.data[3], |
|
|
|
(float)hmdPose.rotation.data[0]); |
|
|
|
(float)hmdPose.rotation.data[0]); |
|
|
|
if( storeRot.equals(Quaternion.ZERO) ) storeRot.set(Quaternion.DIRECTION_Z); |
|
|
|
if( storeRot.equals(Quaternion.ZERO) ) storeRot.set(Quaternion.DIRECTION_Z); |
|
|
|
} |
|
|
|
} |
|
|
|