Pico Unity XR SDK
PXR_Boundary Class Reference

Static Public Member Functions

static void SetVisible (bool value)
 Sets the boundary as visible or invisible.
Note: The setting defined in this function can be overridden by system settings (e.g., proximity trigger) or user settings (e.g., disabling the boundary system). More...
 
static bool GetVisible ()
 Gets whether the boundary is visible. More...
 
static bool GetConfigured ()
 Checks whether the boundary is configured.
Note: Boundary-related functions are available for use only if the boundary is configured. More...
 
static bool GetEnabled ()
 Checks whether the boundary is enabled. More...
 
static PxrBoundaryTriggerInfo TestNode (BoundaryTrackingNode node, BoundaryType boundaryType)
 Checks whether a tracked node (Left hand, Right hand, Head) will trigger the boundary. More...
 
static PxrBoundaryTriggerInfo TestPoint (PxrVector3f point, BoundaryType boundaryType)
 Checks whether a tracked point will trigger the boundary. More...
 
static Vector3[] GetGeometry (BoundaryType boundaryType)
 Gets the collection of boundary points. More...
 
static Vector3 GetDimensions (BoundaryType boundaryType)
 Gets the size of the play area for the custom boundary. More...
 
static void EnableSeeThroughManual (bool value)
 Get the camera image of the device and use it as the environmental background.
Note: More...
 
static int GetDialogState ()
 Gets why the boundary dialog box appears. More...
 

Member Function Documentation

◆ SetVisible()

static void SetVisible ( bool  value)
static

Sets the boundary as visible or invisible.
Note: The setting defined in this function can be overridden by system settings (e.g., proximity trigger) or user settings (e.g., disabling the boundary system).

Parameters
valueWhether to set the boundary as visible or invisble:
  • true: visible
  • false: invisible

◆ GetVisible()

static bool GetVisible ( )
static

Gets whether the boundary is visible.

Returns
  • true: visible
  • false: invisible

◆ GetConfigured()

static bool GetConfigured ( )
static

Checks whether the boundary is configured.
Note: Boundary-related functions are available for use only if the boundary is configured.

Returns
  • true: configured
  • false: not configured

◆ GetEnabled()

static bool GetEnabled ( )
static

Checks whether the boundary is enabled.

Returns
  • true: enabled
  • false: not enabled

◆ TestNode()

static PxrBoundaryTriggerInfo TestNode ( BoundaryTrackingNode  node,
BoundaryType  boundaryType 
)
static

Checks whether a tracked node (Left hand, Right hand, Head) will trigger the boundary.

Parameters
nodeThe node to track:
  • HandLeft: left controller
  • HandRight: right controller
  • Head: HMD
boundaryTypeThe boundary type:
  • OuterBoundary: boundary (custom boundary or in-site fast boundary)
  • PlayArea: the maximum rectangle in the custom boundary (no such a rectangle in the in-site fast boundary)
Returns
A struct that contains the following details:
  • IsTriggering: bool, whether the boundary is triggered
  • ClosestDistance: float, the minimum distance between the tracked node and the boundary
  • ClosestPoint: vector3, the closest point between the tracked node and the boundary
  • ClosestPointNormal: vector3, the normal line of the closest point
  • valid: bool, whether the result returned is valid

◆ TestPoint()

static PxrBoundaryTriggerInfo TestPoint ( PxrVector3f  point,
BoundaryType  boundaryType 
)
static

Checks whether a tracked point will trigger the boundary.

Parameters
pointThe coordinate of the point.
boundaryTypeThe boundary type:
  • OuterBoundary: boundary (custom boundary or in-site fast boundary)
  • PlayArea: customize the maximum rectangle in the custom boundary (no such rectangle for in-site fast boundary)
Returns
A struct that contains the following details:
  • IsTriggering: bool, whether the boundary is triggered
  • ClosestDistance: float, the minimum distance between the tracked node and the boundary
  • ClosestPoint: vector3, the closest point between the tracked node and the boundary
  • ClosestPointNormal: vector3, the normal line of the closest point
  • valid: bool, whether the result returned is valid

◆ GetGeometry()

static Vector3[] GetGeometry ( BoundaryType  boundaryType)
static

Gets the collection of boundary points.

Parameters
boundaryTypeThe boundary type:
  • OuterBoundary: boundary (custom boundary or in-site fast boundary)
  • PlayArea: the maximum customized rectangle in the custom boundary (no such rectangle for in-site fast boundary)
Returns
A collection of boundary points.

◆ GetDimensions()

static Vector3 GetDimensions ( BoundaryType  boundaryType)
static

Gets the size of the play area for the custom boundary.

Parameters
boundaryTypeThe boundary type:
  • OuterBoundary: boundary (custom boundary or in-site fast boundary)
  • PlayArea: the maximum customized rectangle in the custom boundary (no such rectangle for in-site fast boundary)
Returns
A vector3 value, (x, y, z):
  • x: the longer side of the play area
  • y: always return 1
  • z: the shorter side of the play area
    Note: As rectangle is not available for in-site fast boundary, (0, 0, 0) will be returned.

◆ EnableSeeThroughManual()

static void EnableSeeThroughManual ( bool  value)
static

Get the camera image of the device and use it as the environmental background.
Note:

  • Before calling this function, make sure you have set the clear flags of the camera to solid color and have set the background color of the camera to 0 for the alpha channel.
  • If the app is paused, this function will cease. Therefore, you need to call this function again after the app has been resumed.
Parameters
valueWhether to enable SeeThrough:
  • true: enable
  • false: disable

◆ GetDialogState()

static int GetDialogState ( )
static

Gets why the boundary dialog box appears.

Returns
The reason why the boundary dialog box has appeared:
  • -1: NothingDialog (position tracking not enabled, no dialog)
  • 0: GobackDialog (HMD has been outside te boundary, the dialog box will disappear when the HMD is back inside the boundary)
  • 1: ToofarDialog (HDM is 3 merters away from the boundary)
  • 2: LostDialog (reserved UI. Not to display the reason but to display the UI when 6Dof has lost)
  • 3: LostNoReason (the 6Dof has lost, but the system does not report any reason for that)
  • 4: LostCamera (incorrect camera calibration data has caused the loss of 6Dof)
  • 5: LostHighLight (environmental light too strong)
  • 6: LostLowLight (environmental light too weak)
  • 7: LostLowFeatureCount (few environmental features)
  • 8: LostReLocation (the system is in the state of relocation and 6Dof is still lost)

The documentation for this class was generated from the following file: