6 API interface function list

6.1 General function library

The SDK supports VR general functions in the following red dot-marked engine:

_images/6.1.png

Figure 6.1 Supported general functions

For their detailed usage, please refer to the official UE4 document at https://docs.unrealengine.com/en-us/.

Among them:

  1. Reset Orientation and Position nodes only support the function of resetting the positive direction, and the Yaw parameter values in the function node does not work.
  2. Using Get HMDWorn State requires enabling option “Enable Psensor” in Project Setting - PicoMobile

6.2 Dedicated function library

For system functions such as volume and brightness, the SDK also provides the corresponding APIs in the form of blueprint nodes, and in case of right-click on the event graph, and you can see these APIs after entering the Pico Mobile sub-item:

_images/6.2.png

Figure 6.2 System interface

The detailed instructions for APIs are as follows:

_images/6.2.1.png Function Get the current orientation of the headset
Input None
Output None
Return value Current orientation of the headset
_images/6.2.2.png Function Get the current position of the headset
Input None
Output None
Return value Current position of the headset
_images/6.2.3.png Function Get FOV
Input None
Output None
Return value FOV
_images/6.2.4.png Function Get the system brightness
Input None
Output None
Return value Current system brightness (0-255)
_images/6.2.5.png Function Set the system brightness
Input Set the target brightness (0-255)
Output None
Return value True - set successfully, false - fail to get
_images/6.2.6.png Function Increase the system volume (system volume range: 0-15, which will be increased by 1 after calling once)
Input None
Output None
Return value None
_images/6.2.7.png Function Decrease the system volume (system volume range: 0-15, which will be increased by 1 after calling once)
Input None
Output None
Return value None
_images/6.2.8.png Function Get the current system volume.
Input None
Output None
Return value Current system volume
_images/6.2.9.png Function Set the system volume
Input The system volume you want to set (0-15)
Output None
Return value None
_images/6.2.10.png Function Get the maximum volume
Input None
Output None
Return value The number indicating the maximum volume
_images/6.2.11.png Function Get the serial number of the device
Input None
Output Device S/N
Return value None
_images/6.2.12.png Function Get the model of the device
Input None
Output Device Model (Pico Neo3 — Pico Neo 3) (Pico Neo2 — Pico Neo 2) (Pico G2 — Pico G2) (Pico G2 4K— Pico G2 4K)
Return value None
_images/6.2.13.png Function Get the PSensor status (it needs to check “Enable Psensor?” in the project setup)
Input None
Output -1-Fail to get (uncheck “Enable PSensor”?) 0-close to device 1-away from the device
Return value None
_images/6.2.14.png Function Get the dominant hand of the system Settings
Input None
Output None
Return value 0:Right Hand, 1:Left Hand
_images/6.2.15.png Function Enable or disable Foveation Rendering
Input Enable FFR or not
Output None
Return value True:Success, False:Failed
_images/6.2.16.png Function Get FFR Level
Input None
Output FFR Level
Return value True:Success,False:Failed
_images/6.2.17.png Function Set FFR Level
Input FFR Level
Output None
Return value True:Success,False:Failed
_images/6.2.18.png Function Set FFR parameters
Input FFR control parameters
Output None
Return value True:Success,False:Failed
_images/6.2.19.png Function Get device DisplayFrequency
Input None
Output DisplayFrequency
Return value True:Success,False:Failed
_images/6.2.20.png Function Get device GPU Utilization (Only Neo 2 supports)
Input None
Output GPU Utilization(0~1)
Return value True:Success,False:Failure
_images/6.2.21.png Function Get Eye Position and Direction (it needs to check “Enable Eye Tracking” in the project setup, and Only Neo 2 Eye supports)
Input None
Output Eye Position and Direction
Return value True:Success,False:Failed
_images/6.2.22.png Function Set result whether the safety border grid is resident (only Neo 2, Neo 2 Eye support)
Input Bool type True:Open,False:Close
Output None
Return value None
_images/6.2.23.png Function Get result whether the safety border grid is resident (only Neo 2, Neo 2 Eye support)
Input None
Output None
Return value Bool type True:Open,False:Close
_images/6.2.24.png Function Get the dimension of the customized PlayArea Neo 2 Eye support)
Input Bool: whether the quadrilateral is connected in a safe zone or not
Output None
Return value x: length of PlayArea, y:1, z:width of PlayArea, if It is the security zone in situ, V3 is (0, 0, 0)
_images/6.2.25.png Function Set the image size of the camera
Input IntPoint(x,y),and the scale of 1:1 and the size(640,640)are suggested.
Output None
Return value Whether Bool succeeds or not
_images/6.2.26.png Function Get the image of the camera
Input CameraType: Left - Left camera, Right - Right camera
Output None
Return value Texture2D image, Whether Bool succeeds or not
_images/6.2.27.png Function Set result whether security boundary detection is turned on (only Neo 2, Neo 2 Eye support)
Input None
Output Bool value
Return value True:Security boundary opened,False:Security boundary closed
_images/6.2.28.png Function Get whether the system have a valid security boundary (only Neo 2, Neo 2 Eye support)
Input None
Output Bool value
Return value True:There is a valid boundary,False:No valid boundary exists
_images/6.2.29.png Function Get an array of safe zone coordinates
Input Bool: whether the quadrilateral is connected in a safe zone or not
Output Array of safety zone coordinate values, number of safety zone coordinates
Return value Number of safety zone coordinates
_images/6.2.30.png Function Return to the state in which the tracking node triggers a secure boundary
Input Nodes: head, hand. Bool: whether the quadrilateral is connected in a safe zone or not
Output IsTriggering: whether the node touches the border Closest Distance: nearest distance Ppos: coordinates of the nearest point Npos: normal of the nearest point coordinates
Return value True:Success,False:Failure
_images/6.2.31.png Function Return to the state in which the tracking node triggers a secure boundary
Input Enumerated nodes: head, hand Bool: whether the quadrilateral is connected in a safe zone or not
Output IsTriggering: whether the node touches the border Closest Distance: nearest distance Ppos: coordinates of the nearest point Npos: normal of the nearest point coordinates
Return value True:Success,False:Failure