PICO Unity XR SDK
PXR_System Class Reference

Static Public Member Functions

static string GetSDKVersion ()
 Gets the SDK version. More...
 
static double GetPredictedDisplayTime ()
 Gets the predicted time a frame will be displayed after being rendered. More...
 
static bool SetExtraLatencyMode (int mode)
 Sets the extra latency mode. Note: Call this function once only. More...
 
static int GetSensorStatus ()
 Gets the sensor's status. More...
 
static void SetSystemDisplayFrequency (float rate)
 Sets the system display frequency rate. More...
 
static float GetSystemDisplayFrequency ()
 Gets the system display frequency rate. More...
 
static int GetPredictedMainSensorStateNew (ref PxrSensorState2 sensorState, ref int sensorFrameIndex)
 Gets the predicted status of the sensor. More...
 
static int ContentProtect (int data)
 
static void EnableFaceTracking (bool enable)
 Enables/disables face tracking. More...
 
static void EnableLipSync (bool enable)
 Enables/disables lipsync. More...
 
static void GetFaceTrackingData (Int64 ts, GetDataType flags, ref PxrFaceTrackingInfo faceTrackingInfo)
 Gets face tracking data. More...
 
static int SetPerformanceLevels (PxrPerfSettings which, PxrSettingsLevel level)
 Sets a GPU or CPU level for the device. More...
 
static PxrSettingsLevel GetPerformanceLevels (PxrPerfSettings which)
 Gets the device's GPU or CPU level. More...
 
static int SetEyeFOV (EyeType eye, float fovLeft, float fovRight, float fovUp, float fovDown)
 Sets FOV in four directions (left, right, up, and down) for specified eye(s). More...
 
static int SetFaceTrackingStatus (PxrFtLipsyncValue value)
 Switches the face tracking mode. More...
 

Member Function Documentation

◆ GetSDKVersion()

static string GetSDKVersion ( )
static

Gets the SDK version.

Returns
The SDK version.

◆ GetPredictedDisplayTime()

static double GetPredictedDisplayTime ( )
static

Gets the predicted time a frame will be displayed after being rendered.

Returns
The predicted time (in miliseconds).

◆ SetExtraLatencyMode()

static bool SetExtraLatencyMode ( int  mode)
static

Sets the extra latency mode. Note: Call this function once only.

Parameters
modeThe latency mode:
  • 0: ExtraLatencyModeOff (Disable ExtraLatencyMode mode. This option will display the latest rendered frame for display)
  • 1: ExtraLatencyModeOn (Enable ExtraLatencyMode mode. This option will display one frame prior to the latest rendered frame)
  • 2: ExtraLatencyModeDynamic (Use system default setup)
Returns
Whether the extra latency mode has been set:
  • true: success
  • false: failure

◆ GetSensorStatus()

static int GetSensorStatus ( )
static

Gets the sensor's status.

Returns
The sensor's status:
  • 0: null
  • 1: 3DoF
  • 3: 6DoF

◆ SetSystemDisplayFrequency()

static void SetSystemDisplayFrequency ( float  rate)
static

Sets the system display frequency rate.

Parameters
rateThe frequency rate: 72; 90; 120. Other values are invalid.

◆ GetSystemDisplayFrequency()

static float GetSystemDisplayFrequency ( )
static

Gets the system display frequency rate.

Returns
The system display frequency rate.

◆ GetPredictedMainSensorStateNew()

static int GetPredictedMainSensorStateNew ( ref PxrSensorState2  sensorState,
ref int  sensorFrameIndex 
)
static

Gets the predicted status of the sensor.

Parameters
sensorStateSensor's coordinate:
  • pose: in-app coordinate
  • globalPose: global coordinate
sensorFrameIndexSensor frame index.
Returns
The predicted status of the sensor.

◆ EnableFaceTracking()

static void EnableFaceTracking ( bool  enable)
static

Enables/disables face tracking.

Note
Only supported by PICO 4 Pro and PICO 4 Enterprise.
Parameters
enableWhether to enable/disable face tracking:
  • true: enable
  • false: disable

◆ EnableLipSync()

static void EnableLipSync ( bool  enable)
static

Enables/disables lipsync.

Note
Only supported by PICO 4 Pro and PICO 4 Enterprise.
Parameters
enableWhether to enable/disable lipsync:
  • true: enable
  • false: disable

◆ GetFaceTrackingData()

static void GetFaceTrackingData ( Int64  ts,
GetDataType  flags,
ref PxrFaceTrackingInfo  faceTrackingInfo 
)
static

Gets face tracking data.

Note
Only supported by PICO 4 Pro and PICO 4 Enterprise.
Parameters
ts(Optional) A reserved parameter, pass 0.
flagsThe face tracking mode to retrieve data for. Enumertions:
  • PXR_GET_FACE_DATA_DEFAULT (invalid, only for making it compatible with older SDK version)
  • PXR_GET_FACE_DATA: face only
  • PXR_GET_LIP_DATA: lipsync only
  • PXR_GET_FACELIP_DATA: hybrid (both face and lipsync)
faceTrackingInfoReturns the PxrFaceTrackingInfo struct that contains the following face tracking data:
  • timestamp: Int64, reserved field
  • blendShapeWeight: float[], pass 0.
  • videoInputValid: float[], the input validity of the upper and lower parts of the face.
  • laughingProb: float[], the coefficient of laughter.
  • emotionProb: float[], the emotion factor.
  • reserved: float[], reserved field.

◆ SetPerformanceLevels()

static int SetPerformanceLevels ( PxrPerfSettings  which,
PxrSettingsLevel  level 
)
static

Sets a GPU or CPU level for the device.

Parameters
whichChoose to set a GPU or CPU level:
  • CPU
  • GPU
levelSelect a level from the following:
  • POWER_SAVINGS: power-saving level
  • SUSTAINED_LOW: low level
  • SUSTAINED_HIGH: high level
  • BOOST: top-high level, be careful to use this level
Returns
  • 0: success
  • 1: failure

◆ GetPerformanceLevels()

static PxrSettingsLevel GetPerformanceLevels ( PxrPerfSettings  which)
static

Gets the device's GPU or CPU level.

Parameters
whichChoose to get GPU or CPU level:
  • CPU
  • GPU
Returns
Returns one of the following levels:
  • POWER_SAVINGS: power-saving level
  • SUSTAINED_LOW: low level
  • SUSTAINED_HIGH: high level
  • BOOST: top-high level, be careful to use this level

◆ SetEyeFOV()

static int SetEyeFOV ( EyeType  eye,
float  fovLeft,
float  fovRight,
float  fovUp,
float  fovDown 
)
static

Sets FOV in four directions (left, right, up, and down) for specified eye(s).

Parameters
eyeThe eye to set FOV for:
  • LeftEye
  • RightEye
  • BothEye
fovLeftThe horizontal FOV (in degrees) for the left part of the eye, for example, 47.5.
fovRightThe horizontal FOV (in degrees) for the right part of the eye..
fovUpThe vertical FOV (in degrees) for the upper part of the eye.
fovDownThe vertical FOV (in degrees) for the lower part of the eye.
Returns
  • 0: success
  • 1: failure

◆ SetFaceTrackingStatus()

static int SetFaceTrackingStatus ( PxrFtLipsyncValue  value)
static

Switches the face tracking mode.

Note
Only supported by PICO 4 Pro and PICO 4 Enterprise.
Parameters
valueSTOP_FT: to stop the "Face Only" mode. STOP_LIPSYNC: to stop the "Lipsync Only" mode. START_FT: to start the "Face Only" mode. START_LIPSYNC: to start the "Lipsync Only" mode.
Returns
0: success 1: failure