public OVRBoundary.BoundaryTestResult TestNode(OVRBoundary.Node node, OVRBoundary.BoundaryType boundaryType) { OVRPlugin.BoundaryTestResult boundaryTestResult = OVRPlugin.TestBoundaryNode((OVRPlugin.Node)node, (OVRPlugin.BoundaryType)boundaryType); return(new OVRBoundary.BoundaryTestResult { IsTriggering = (boundaryTestResult.IsTriggering == OVRPlugin.Bool.True), ClosestDistance = boundaryTestResult.ClosestDistance, ClosestPoint = boundaryTestResult.ClosestPoint.FromFlippedZVector3f(), ClosestPointNormal = boundaryTestResult.ClosestPointNormal.FromFlippedZVector3f() }); }
/// <summary> /// Returns the results of testing a tracked node against the specified boundary type. /// All points are returned in local tracking space shared by tracked nodes and accessible through OVRCameraRig's trackingSpace anchor. /// </summary> public OVRBoundary.BoundaryTestResult TestNode(OVRBoundary.Node node, OVRBoundary.BoundaryType boundaryType) { OVRPlugin.BoundaryTestResult ovrpRes = OVRPlugin.TestBoundaryNode((OVRPlugin.Node)node, (OVRPlugin.BoundaryType)boundaryType); OVRBoundary.BoundaryTestResult res = new OVRBoundary.BoundaryTestResult() { IsTriggering = (ovrpRes.IsTriggering == OVRPlugin.Bool.True), ClosestDistance = ovrpRes.ClosestDistance, ClosestPoint = ovrpRes.ClosestPoint.FromFlippedZVector3f(), ClosestPointNormal = ovrpRes.ClosestPointNormal.FromFlippedZVector3f(), }; return(res); }