6 API interface function list
6.1 General function library
The SDK supports VR general functions in the following red dot-marked engine:
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:
- 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.
- 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:
Figure 6.2 System interface
The detailed instructions for APIs are as follows:
|
Function |
Get the current orientation of the headset |
Input |
None |
Output |
None |
Return value |
Current orientation of the headset |
|
Function |
Get the current position of the headset |
Input |
None |
Output |
None |
Return value |
Current position of the headset |
|
Function |
Get FOV |
Input |
None |
Output |
None |
Return value |
FOV |
|
Function |
Get the system brightness |
Input |
None |
Output |
None |
Return value |
Current system brightness (0-255) |
|
Function |
Set the system brightness |
Input |
Set the target brightness (0-255) |
Output |
None |
Return value |
True - set successfully, false - fail to get |
|
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 |
|
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 |
|
Function |
Get the current system volume. |
Input |
None |
Output |
None |
Return value |
Current system volume |
|
Function |
Set the system volume |
Input |
The system volume you want to set (0-15) |
Output |
None |
Return value |
None |
|
Function |
Get the maximum volume |
Input |
None |
Output |
None |
Return value |
The number indicating the maximum volume |
|
Function |
Get the serial number of the device |
Input |
None |
Output |
Device S/N |
Return value |
None |
|
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 |
|
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 |
|
Function |
Get the dominant hand of the system Settings |
Input |
None |
Output |
None |
Return value |
0:Right Hand, 1:Left Hand |
|
Function |
Enable or disable Foveation Rendering |
Input |
Enable FFR or not |
Output |
None |
Return value |
True:Success, False:Failed |
|
Function |
Get FFR Level |
Input |
None |
Output |
FFR Level |
Return value |
True:Success,False:Failed |
|
Function |
Set FFR Level |
Input |
FFR Level |
Output |
None |
Return value |
True:Success,False:Failed |
|
Function |
Set FFR parameters |
Input |
FFR control parameters |
Output |
None |
Return value |
True:Success,False:Failed |
|
Function |
Get device DisplayFrequency |
Input |
None |
Output |
DisplayFrequency |
Return value |
True:Success,False:Failed |
|
Function |
Get device GPU Utilization (Only Neo 2 supports) |
Input |
None |
Output |
GPU Utilization(0~1) |
Return value |
True:Success,False:Failure |
|
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 |
|
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 |
|
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 |
|
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) |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |