OPENXR Scol plugin
Functions
Scol functions definition

Functions

int _CRopenXrDevice (mmachine m)
 _CRopenXrDevice : This function create a OpenXr object
 
int _DSopenXrDevice (mmachine m)
 _DSopenXrDevice : Destroy OpenXr object
 
int _GetOpenXrVisibility (mmachine m)
 _GetOpenXrVisibility : Get the OpenXr HMD visibility state
 
int _GetOpenXrOrientation (mmachine m)
 _GetOpenXrOrientation : Get the OpenXr sensor orientation
 
int _GetOpenXrPosition (mmachine m)
 _GetOpenXrPosition : Get the OpenXr position from the IR camera
 
int _GetOpenXrFovY (mmachine m)
 _GetOpenXrFovY : Get the OpenXr fovY
 
int _GetOpenXrIPD (mmachine m)
 _GetOpenXrIPD : Get the OpenXr eye spacing
 
int _UpdateOpenXr (mmachine m)
 _UpdateOpenXr : start OpenXr update you should call this on each render frame
 
int _UpdateOpenXrTextures (mmachine m)
 _UpdateOpenXrTextures : Update the HMD textures pointer
 
int _GetOpenXrDeviceName (mmachine m)
 _GetOpenXrDeviceName : Get the openXr device type
 
int _GetOpenXrProjectionMatrix (mmachine m)
 _GetOpenXrProjectionMatrix : Get the OpenXr camera projection matrix
 
int _GetOpenXrTextureSize (mmachine m)
 _GetOpenXrTextureSize : Get the OpenXr texture size for RTT
 
int _GetOpenXrControllerVisibility (mmachine m)
 _GetOpenXrControllerVisibility : Get the OpenXr controller visibility state
 
int _GetOpenXrControllerPosition (mmachine m)
 _GetOpenXrControllerPosition : Get the OpenXr controller position
 
int _GetOpenXrControllerOrientation (mmachine m)
 _GetOpenXrControllerOrientation : Get the OpenXr controller orientation
 
int _GetOpenXrControllerVelocity (mmachine m)
 _GetOpenXrControllerVelocity : Get the OpenXr controller velocity
 
int _GetOpenXrControllerAngularVelocity (mmachine m)
 _GetOpenXrControllerAngularVelocity : Get the OpenXr controller velocity
 
int _GetOpenXrControllerButtons (mmachine m)
 _GetOpenXrControllerButtons : Get the OpenXr controller buttons state button order in list is A, B, RThumb, X, Y, LThumb, grip, trigger, menu
 
int _GetOpenXrControllerTouches (mmachine m)
 _GetOpenXrControllerTouches : Get the OpenXr controller touch state button order in list is A, B, RThumb, X, Y, LThumb, thumb up, trigger, index pointing
 
int _GetOpenXrControllerAxis (mmachine m)
 _GetOpenXrControllerAxis : Get the OpenXr controller axis values Axis order is touch pad X, touch pad Y, trigger Z, grip W
 
int _GetOpenXrControllerType (mmachine m)
 _GetOpenXrControllerType : Get the OpenXr controller type, controller or hand
 
int _GetOpenXrControllerBonesRotation (mmachine m)
 _GetOpenXrControllerBonesRotation : Get the OpenXr controller bones rotation
 
int _SetOpenXrControllerRumble (mmachine m)
 _SetOpenXrControllerRumble : Set the OpenXr controller rumble value
 
int _SetOpenXrAppName (mmachine m)
 _SetOpenXrAppName : Set the OpenXr application name
 
int _SetOpenXrExtensions (mmachine m)
 _SetOpenXrExtensions : Set the OpenXr extensions to enable if this is supported
 
int _GetOpenXrExtensions (mmachine m)
 _GetOpenXrExtensions : Get the OpenXr extensions that are set to enable
 
int _SetOpenXrPassthroughEnable (mmachine m)
 _SetOpenXrPassthroughEnable : Set the OpenXr passthrough enable state
 
int _GetOpenXrPassthroughSupported (mmachine m)
 _GetOpenXrPassthroughSupported : Get the OpenXr passthrough support
 

Detailed Description

Scol functions definition

Function Documentation

◆ _CRopenXrDevice()

int _CRopenXrDevice ( mmachine  m)

_CRopenXrDevice : This function create a OpenXr object

Prototype: fun [Chn I F] ObjOpenXr

Parameters
Chn: channel
I: type 0 OpenGL, 1 D3D11
F: scale ratio for render textures
Returns
ObjOpenXr : the OpenXr object if success, NIL otherwise

Definition at line 91 of file scolplugin.cpp.

◆ _DSopenXrDevice()

int _DSopenXrDevice ( mmachine  m)

_DSopenXrDevice : Destroy OpenXr object

fun [ObjOpenXr] I

Parameters
ObjOpenXr: OpenXr Object to destroy
Returns
I : 0 if success, NIL otherwise

Definition at line 161 of file scolplugin.cpp.

◆ _GetOpenXrControllerAngularVelocity()

int _GetOpenXrControllerAngularVelocity ( mmachine  m)

_GetOpenXrControllerAngularVelocity : Get the OpenXr controller velocity

fun [ObjOpenXr I] [F F F]

Parameters
ObjOpenXr: OpenXr Object
I: Left or Right controller (OPENVR_CONTROLLER_LEFT or OPENVR_CONTROLLER_RIGHT)
Returns
[F F F] : the controller velocty on success, NIL otherwise

Definition at line 894 of file scolplugin.cpp.

◆ _GetOpenXrControllerAxis()

int _GetOpenXrControllerAxis ( mmachine  m)

_GetOpenXrControllerAxis : Get the OpenXr controller axis values Axis order is touch pad X, touch pad Y, trigger Z, grip W

fun [ObjOpenXr I] [F F F F]

Parameters
ObjOpenXr: OpenXr Object
I: Left or Right controller (OPENVR_CONTROLLER_LEFT or OPENVR_CONTROLLER_RIGHT)
Returns
[F F F F] : the controller axis values on success, NIL otherwise

Definition at line 1063 of file scolplugin.cpp.

◆ _GetOpenXrControllerBonesRotation()

int _GetOpenXrControllerBonesRotation ( mmachine  m)

_GetOpenXrControllerBonesRotation : Get the OpenXr controller bones rotation

fun [ObjOpenXr I] [[F F F F] r1]

Parameters
ObjOpenXr: OpenXr Object
I: Left or Right controller (OPENVR_CONTROLLER_LEFT or OPENVR_CONTROLLER_RIGHT)
Returns
[[F F F F] r1] : the controller bones quaternion list on success, NIL otherwise

Definition at line 1165 of file scolplugin.cpp.

◆ _GetOpenXrControllerButtons()

int _GetOpenXrControllerButtons ( mmachine  m)

_GetOpenXrControllerButtons : Get the OpenXr controller buttons state button order in list is A, B, RThumb, X, Y, LThumb, grip, trigger, menu

fun [ObjOpenXr I] [I r1]

Parameters
ObjOpenXr: OpenXr Object
I: Left or Right controller (OPENVR_CONTROLLER_LEFT or OPENVR_CONTROLLER_RIGHT)
Returns
[I r1] : the controller buttons state list on success, NIL otherwise

Definition at line 947 of file scolplugin.cpp.

◆ _GetOpenXrControllerOrientation()

int _GetOpenXrControllerOrientation ( mmachine  m)

_GetOpenXrControllerOrientation : Get the OpenXr controller orientation

fun [ObjOpenXr I] [F F F F]

Parameters
ObjOpenXr: OpenXr Object
I: Left or Right controller (OPENVR_CONTROLLER_LEFT or OPENVR_CONTROLLER_RIGHT)
Returns
[F F F F] : the controller quaternion on success, NIL otherwise

Definition at line 789 of file scolplugin.cpp.

◆ _GetOpenXrControllerPosition()

int _GetOpenXrControllerPosition ( mmachine  m)

_GetOpenXrControllerPosition : Get the OpenXr controller position

fun [ObjOpenXr I] [F F F]

Parameters
ObjOpenXr: OpenXr Object
I: Left or Right controller (OPENVR_CONTROLLER_LEFT or OPENVR_CONTROLLER_RIGHT)
Returns
[F F F] : the controller position on success, NIL otherwise

Definition at line 737 of file scolplugin.cpp.

◆ _GetOpenXrControllerTouches()

int _GetOpenXrControllerTouches ( mmachine  m)

_GetOpenXrControllerTouches : Get the OpenXr controller touch state button order in list is A, B, RThumb, X, Y, LThumb, thumb up, trigger, index pointing

fun [ObjOpenXr I] [I r1]

Parameters
ObjOpenXr: OpenXr Object
I: Left or Right controller (OPENVR_CONTROLLER_LEFT or OPENVR_CONTROLLER_RIGHT)
Returns
[I r1] : the controller touch state list on success, NIL otherwise

Definition at line 1005 of file scolplugin.cpp.

◆ _GetOpenXrControllerType()

int _GetOpenXrControllerType ( mmachine  m)

_GetOpenXrControllerType : Get the OpenXr controller type, controller or hand

fun [ObjOpenXr I] I

Parameters
ObjOpenXr: OpenXr Object
I: Left or Right controller (OPENVR_CONTROLLER_LEFT or OPENVR_CONTROLLER_RIGHT)
Returns
I : the controller type (0 controller, 1 hand) on success, NIL otherwise

Definition at line 1123 of file scolplugin.cpp.

◆ _GetOpenXrControllerVelocity()

int _GetOpenXrControllerVelocity ( mmachine  m)

_GetOpenXrControllerVelocity : Get the OpenXr controller velocity

fun [ObjOpenXr I] [F F F]

Parameters
ObjOpenXr: OpenXr Object
I: Left or Right controller (OPENVR_CONTROLLER_LEFT or OPENVR_CONTROLLER_RIGHT)
Returns
[F F F] : the controller velocty on success, NIL otherwise

Definition at line 842 of file scolplugin.cpp.

◆ _GetOpenXrControllerVisibility()

int _GetOpenXrControllerVisibility ( mmachine  m)

_GetOpenXrControllerVisibility : Get the OpenXr controller visibility state

fun [ObjOpenXr I] I

Parameters
ObjOpenXr: OpenXr Object
I: Left or Right controller (OPENVR_CONTROLLER_LEFT or OPENVR_CONTROLLER_RIGHT)
Returns
I : the controller visibility on success, NIL otherwise

Definition at line 694 of file scolplugin.cpp.

◆ _GetOpenXrDeviceName()

int _GetOpenXrDeviceName ( mmachine  m)

_GetOpenXrDeviceName : Get the openXr device type

fun [ObjOpenXr] S

Parameters
ObjOpenXr: OpenXr Object
Returns
S : device name, NIL otherwise

Definition at line 479 of file scolplugin.cpp.

◆ _GetOpenXrExtensions()

int _GetOpenXrExtensions ( mmachine  m)

_GetOpenXrExtensions : Get the OpenXr extensions that are set to enable

fun [] I

Returns
I : a combination of OPENXR_HAND_TRACKING_EXTENSION and OPENXR_PASSTHROUGH_EXTENSION, NIL otherwise

Definition at line 1352 of file scolplugin.cpp.

◆ _GetOpenXrFovY()

int _GetOpenXrFovY ( mmachine  m)

_GetOpenXrFovY : Get the OpenXr fovY

fun [ObjOpenXr] F

Parameters
ObjOpenXr: OpenXr Object
Returns
F : FovY on success, NIL otherwise

Definition at line 331 of file scolplugin.cpp.

◆ _GetOpenXrIPD()

int _GetOpenXrIPD ( mmachine  m)

_GetOpenXrIPD : Get the OpenXr eye spacing

fun [ObjOpenXr] F

Parameters
ObjOpenXr: OpenXr Object
Returns
F : IPD on success, NIL otherwise

Definition at line 366 of file scolplugin.cpp.

◆ _GetOpenXrOrientation()

int _GetOpenXrOrientation ( mmachine  m)

_GetOpenXrOrientation : Get the OpenXr sensor orientation

fun [ObjOpenXr] [F F F F]

Parameters
ObjOpenXr: OpenXr Object
Returns
[F F F F] : the orientation quaternion if success, NIL otherwise

Definition at line 226 of file scolplugin.cpp.

◆ _GetOpenXrPassthroughSupported()

int _GetOpenXrPassthroughSupported ( mmachine  m)

_GetOpenXrPassthroughSupported : Get the OpenXr passthrough support

fun [ObjOpenXr] I

Parameters
ObjOpenXr: OpenXr Object
Returns
I : 1 if supported, 0 if not, NIL otherwise

Definition at line 1415 of file scolplugin.cpp.

◆ _GetOpenXrPosition()

int _GetOpenXrPosition ( mmachine  m)

_GetOpenXrPosition : Get the OpenXr position from the IR camera

fun [ObjOpenXr] [F F F]

Parameters
ObjOpenXr: OpenXr Object
Returns
[F F F] : the position if success, NIL otherwise

Definition at line 279 of file scolplugin.cpp.

◆ _GetOpenXrProjectionMatrix()

int _GetOpenXrProjectionMatrix ( mmachine  m)

_GetOpenXrProjectionMatrix : Get the OpenXr camera projection matrix

fun [ObjOpenXr F F] [[[F F F F] [F F F F] [F F F F] [F F F F]] [[F F F F] [F F F F] [F F F F] [F F F F]]]

Parameters
ObjOpenXr: OpenXr Object
F: Camera near clip
F: Camera far clip
Returns
[[[F F F F] [F F F F] [F F F F] [F F F F]] [[F F F F] [F F F F] [F F F F] [F F F F]]] : the left and right projection matrix if success, NIL otherwise

Definition at line 517 of file scolplugin.cpp.

◆ _GetOpenXrTextureSize()

int _GetOpenXrTextureSize ( mmachine  m)

_GetOpenXrTextureSize : Get the OpenXr texture size for RTT

fun [ObjOpenXr] [I I]

Parameters
ObjOpenXr: OpenXr Object
Returns
[I I] : the texture size if success, NIL otherwise

Definition at line 645 of file scolplugin.cpp.

◆ _GetOpenXrVisibility()

int _GetOpenXrVisibility ( mmachine  m)

_GetOpenXrVisibility : Get the OpenXr HMD visibility state

fun [ObjOpenXr] I

Parameters
ObjOpenXr: OpenXr Object
Returns
I : 1 if visible 0 if not, NIL otherwise

Definition at line 190 of file scolplugin.cpp.

◆ _SetOpenXrAppName()

int _SetOpenXrAppName ( mmachine  m)

_SetOpenXrAppName : Set the OpenXr application name

fun [S] I

Parameters
S: then application name for XR
Returns
I : 1 on success, 0 on error, NIL otherwise

Definition at line 1295 of file scolplugin.cpp.

◆ _SetOpenXrControllerRumble()

int _SetOpenXrControllerRumble ( mmachine  m)

_SetOpenXrControllerRumble : Set the OpenXr controller rumble value

fun [ObjOpenXr I F] I

Parameters
ObjOpenXr: OpenXr Object
I: Left or Right controller (OPENVR_CONTROLLER_LEFT or OPENVR_CONTROLLER_RIGHT)
F: Rumble force
Returns
I : 1 on success, NIL otherwise

Definition at line 1248 of file scolplugin.cpp.

◆ _SetOpenXrExtensions()

int _SetOpenXrExtensions ( mmachine  m)

_SetOpenXrExtensions : Set the OpenXr extensions to enable if this is supported

fun [I] I

Parameters
I: a combination of OPENXR_HAND_TRACKING_EXTENSION and OPENXR_PASSTHROUGH_EXTENSION
Returns
I : 1 on success, 0 on error, NIL otherwise

Definition at line 1324 of file scolplugin.cpp.

◆ _SetOpenXrPassthroughEnable()

int _SetOpenXrPassthroughEnable ( mmachine  m)

_SetOpenXrPassthroughEnable : Set the OpenXr passthrough enable state

fun [ObjOpenXr I] I

Parameters
ObjOpenXr: OpenXr Object
I: new enable state 0 or 1
Returns
I : 1 on success, 0 on error, NIL otherwise

Definition at line 1374 of file scolplugin.cpp.

◆ _UpdateOpenXr()

int _UpdateOpenXr ( mmachine  m)

_UpdateOpenXr : start OpenXr update you should call this on each render frame

fun [ObjOpenXr] I

Parameters
ObjOpenXr: OpenXr Object
Returns
I : 1 if updated 0 if not, NIL otherwise

Definition at line 402 of file scolplugin.cpp.

◆ _UpdateOpenXrTextures()

int _UpdateOpenXrTextures ( mmachine  m)

_UpdateOpenXrTextures : Update the HMD textures pointer

fun[ObjOpenXr ObjPtr ObjPtr] I

Parameters
ObjOpenXr: OpenXr Object
ObjPtr: Left texture pointer from 3D engine
ObjPtr: Right texture pointer from 3D engine
Returns
I : 1 if updated 0 if not, NIL otherwise

Definition at line 437 of file scolplugin.cpp.