예제 #1
0
        public void Session_GetDevicePoses()
        {
            IntPtr sessionPtr = CreateSession();

            Assert.AreNotEqual(IntPtr.Zero, sessionPtr);

            var deviceTypes = new TrackedDeviceType[1];

            deviceTypes[0] = TrackedDeviceType.HMD;

            var outDevicePoses = new PoseStatef[1];

            //var deviceTypes = new TrackedDeviceType[3];
            //deviceTypes[0] = TrackedDeviceType.HMD;
            //deviceTypes[1] = TrackedDeviceType.LTouch;
            //deviceTypes[2] = TrackedDeviceType.RTouch;

            //var outDevicePoses = new PoseStatef[3];

            Result result = OVR.GetDevicePoses(sessionPtr, deviceTypes, 0, outDevicePoses);

            Assert.IsTrue(result >= Result.Success || result == Result.LostTracking, "Failed to call GetDevicePoses");
        }
예제 #2
0
 /// <inheritdoc />
 public override Result TestBoundary(IntPtr sessionPtr, TrackedDeviceType deviceBitmask, BoundaryType boundaryType, ref BoundaryTestResult testResult)
 {
     return(SafeNativeMethods.ovr_TestBoundary(sessionPtr, deviceBitmask, boundaryType, ref testResult));
 }
예제 #3
0
 public static extern Result ovr_TestBoundary(ovrSession session, TrackedDeviceType deviceBitmask, BoundaryType boundaryType, ref BoundaryTestResult outTestResult);