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. 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)
 Gets the camera image of the device and use it as the environmental background. 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. More...
 
static PxrTrackingState GetSeeThroughTrackingState ()
 Gets the current status of seethrough tracking. 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. 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-customize the maximum 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-customize the maximum 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

Gets the camera image of the device and use it as the environmental background. 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.

Note
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-do not enable.

◆ GetSeeThroughTrackingState()

static PxrTrackingState GetSeeThroughTrackingState ( )
static

Gets the current status of seethrough tracking.

Returns
Returns PxrTrackingState. Below are the enumerations:
  • LostNoReason: no reason
  • LostCamera: camera calibration data error
  • LostHighLight: environment lighting too bright
  • LostLowLight: environment lighting too dark
  • LostLowFeatureCount: few environmental features
  • LostReLocation: relocation in progress
  • LostInitialization: initialization in progress
  • LostNoCamera: camera data error
  • LostNoIMU: IMU data error
  • LostIMUJitter: IMU data jitter
  • LostUnknown: unknown error