Пример #1
0
 public OVRBoundary.BoundaryTestResult TestPoint(Vector3 point, OVRBoundary.BoundaryType boundaryType)
 {
     OVRPlugin.BoundaryTestResult boundaryTestResult = OVRPlugin.TestBoundaryPoint(point.ToFlippedZVector3f(), (OVRPlugin.BoundaryType)boundaryType);
     return(new OVRBoundary.BoundaryTestResult
     {
         IsTriggering = (boundaryTestResult.IsTriggering == OVRPlugin.Bool.True),
         ClosestDistance = boundaryTestResult.ClosestDistance,
         ClosestPoint = boundaryTestResult.ClosestPoint.FromFlippedZVector3f(),
         ClosestPointNormal = boundaryTestResult.ClosestPointNormal.FromFlippedZVector3f()
     });
 }
Пример #2
0
    /// <summary>
    /// Returns the results of testing a 3d point against the specified boundary type.
    /// The test point is expected in local tracking space.
    /// All points are returned in local tracking space shared by tracked nodes and accessible through OVRCameraRig's trackingSpace anchor.
    /// </summary>
    public OVRBoundary.BoundaryTestResult TestPoint(Vector3 point, OVRBoundary.BoundaryType boundaryType)
    {
        OVRPlugin.BoundaryTestResult ovrpRes = OVRPlugin.TestBoundaryPoint(point.ToFlippedZVector3f(), (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);
    }
Пример #3
0
	/// <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;
	}