예제 #1
0
        /// <inheritdoc />
        public override void CalcEyePoses(Posef headPose, Vector3f[] hmdToEyeOffset, ref Posef[] eyePoses)
        {
            if (eyePoses == null)
            {
                throw new ArgumentNullException("eyePoses");
            }

            if (eyePoses.Length != 2)
            {
                throw new ArgumentException("eyePoses array should have 2 Posef items", "eyePoses");
            }


            GCHandle posesHandle = GCHandle.Alloc(eyePoses, GCHandleType.Pinned);

            try
            {
                SafeNativeMethods.ovr_CalcEyePoses(headPose, hmdToEyeOffset, posesHandle.AddrOfPinnedObject());
            }
            finally
            {
                posesHandle.Free();
            }
        }
예제 #2
0
 /// <inheritdoc />
 public override void Posef_FlipHandedness(ref Posef inPose, ref Posef outPose)
 {
     SafeNativeMethods.ovrPosef_FlipHandedness(ref inPose, ref outPose);
 }
예제 #3
0
 /// <inheritdoc />
 public override Result SpecifyTrackingOrigin(IntPtr sessionPtr, Posef originPose)
 {
     return(SafeNativeMethods.ovr_SpecifyTrackingOrigin(sessionPtr, originPose));
 }