Project

General

Profile

OPENVR Scol plugin
Scol functions definition

Functions

int _CRopenvrDevice (mmachine m)
 _CRopenvrDevice : This function create a Openvr object More...
 
int _DSopenvrDevice (mmachine m)
 _DSopenvrDevice : Destroy Openvr object More...
 
int _GetOpenvrVisibility (mmachine m)
 _GetOpenvrVisibility : Get the Openvr HMD visibility state More...
 
int _GetOpenvrOrientation (mmachine m)
 _GetOpenvrOrientation : Get the Openvr sensor orientation More...
 
int _GetOpenvrPosition (mmachine m)
 _GetOpenvrPosition : Get the Openvr position from the IR camera More...
 
int _GetOpenvrAspectRatio (mmachine m)
 _GetOpenvrAspectRatio : Get the Openvr camera aspect ratio More...
 
int _GetOpenvrIPD (mmachine m)
 _GetOpenvrIPD : Get the Openvr eye spacing More...
 
int _GetOpenvrFovY (mmachine m)
 _GetOpenvrFovY : Get the Openvr eye spacing More...
 
int _ResetOpenvrDevice (mmachine m)
 _ResetOpenvrDevice : Reset Openvr sensor More...
 
int _UpdateOpenvr (mmachine m)
 _UpdateOpenvr : start Openvr update you should call this on each render frame More...
 
int _UpdateOpenvrTextures (mmachine m)
 _UpdateOpenvrTextures : Update the HMD textures pointer More...
 
int _GetOpenvrDeviceName (mmachine m)
 _GetOpenvrDeviceName : Get the openvr device type More...
 
int _GetOpenvrProjectionMatrix (mmachine m)
 _GetOpenvrProjectionMatrix : Get the Openvr camera projection matrix More...
 
int _GetOpenvrTextureSize (mmachine m)
 _GetOpenvrTextureSize : Get the Openvr texture size for RTT More...
 
int _GetOpenvrControllerVisibility (mmachine m)
 _GetOpenvrControllerVisibility : Get the Openvr controller visibility state More...
 
int _GetOpenvrControllerPosition (mmachine m)
 _GetOpenvrControllerPosition : Get the Openvr controller position More...
 
int _GetOpenvrControllerOrientation (mmachine m)
 _GetOpenvrControllerOrientation : Get the Openvr controller orientation More...
 
int _GetOpenvrControllerVelocity (mmachine m)
 _GetOpenvrControllerVelocity : Get the Openvr controller velocity More...
 
int _GetOpenvrControllerAngularVelocity (mmachine m)
 _GetOpenvrControllerAngularVelocity : Get the Openvr controller velocity More...
 
int _GetOpenvrControllerButtons (mmachine m)
 _GetOpenvrControllerButtons : Get the Openvr controller buttons state button order in list is application menu, grip, A, touchpad, trigger More...
 
int _GetOpenvrControllerAxis (mmachine m)
 _GetOpenvrControllerAxis : Get the Openvr controller axis values Axis order is touch pad X, touch pad Y, trigger Z More...
 
int _SetOpenvrControllerRumble (mmachine m)
 _SetOpenvrControllerRumble : Set the Openvr controller rumble value More...
 
int _IsOpenvrCameraAvailable (mmachine m)
 _IsOpenvrCameraAvailable : Get the Openvr camera availability More...
 
int _OpenOpenvrCamera (mmachine m)
 _OpenOpenvrCamera : Open the Openvr camera to get size and frames later More...
 
int _CloseOpenvrCamera (mmachine m)
 _CloseOpenvrCamera : Close the Openvr camera More...
 
int _GetOpenvrCameraSize (mmachine m)
 _GetOpenvrCameraSize : Get the Openvr camera frame size, the camera must be openned first More...
 
int _GetOpenvrCameraFrame (mmachine m)
 _GetOpenvrCameraFrame : Get the Openvr camera frame into an existing bitmap the bitmap must have the same size More...
 

Detailed Description

Scol functions definition

Function Documentation

◆ _CloseOpenvrCamera()

int _CloseOpenvrCamera ( mmachine  m)

_CloseOpenvrCamera : Close the Openvr camera

fun [ObjOpenvr] I

Parameters
ObjOpenvr: Openvr Object
Returns
I : 1 if a camera enable, 0 if not, NIL otherwise

Definition at line 1334 of file scolplugin.cpp.

◆ _CRopenvrDevice()

int _CRopenvrDevice ( mmachine  m)

_CRopenvrDevice : This function create a Openvr object

Prototype: fun [Chn fun [ObjOpenvr u0] u1 u0 fun [ObjOpenvr u2 F] u3 u2] ObjOpenvr

Parameters
Chn: channel
fun[ObjOpenvr u0] u1 : callback on Steam VR quit
u0: user parameter for first callback
fun[ObjOpenvr u0 F] u1 : callback on IPD change
u2: user parameter for second callback
Returns
ObjOpenvr : the Openvr object if success, NIL otherwise

Definition at line 99 of file scolplugin.cpp.

◆ _DSopenvrDevice()

int _DSopenvrDevice ( mmachine  m)

_DSopenvrDevice : Destroy Openvr object

fun [ObjOpenvr] I

Parameters
ObjOpenvr: Openvr Object to destroy
Returns
I : 0 if success, NIL otherwise

Definition at line 203 of file scolplugin.cpp.

◆ _GetOpenvrAspectRatio()

int _GetOpenvrAspectRatio ( mmachine  m)

_GetOpenvrAspectRatio : Get the Openvr camera aspect ratio

fun [ObjOpenvr] F

Parameters
ObjOpenvr: Openvr Object
Returns
F : Aspect ratio on success, NIL otherwise

Definition at line 373 of file scolplugin.cpp.

◆ _GetOpenvrCameraFrame()

int _GetOpenvrCameraFrame ( mmachine  m)

_GetOpenvrCameraFrame : Get the Openvr camera frame into an existing bitmap the bitmap must have the same size

fun [ObjOpenvr ObjBitmap] ObjBitmap

Parameters
ObjOpenvr: Openvr Object
ObjBitmap: bitmap to update
Returns
ObjBitmap : return same bitmap if success or NIL otherwise

Definition at line 1420 of file scolplugin.cpp.

◆ _GetOpenvrCameraSize()

int _GetOpenvrCameraSize ( mmachine  m)

_GetOpenvrCameraSize : Get the Openvr camera frame size, the camera must be openned first

fun [ObjOpenvr] [I I]

Parameters
ObjOpenvr: Openvr Object
Returns
[I I] : the frame width and height on success, NIL otherwise

Definition at line 1370 of file scolplugin.cpp.

◆ _GetOpenvrControllerAngularVelocity()

int _GetOpenvrControllerAngularVelocity ( mmachine  m)

_GetOpenvrControllerAngularVelocity : Get the Openvr controller velocity

fun [ObjOpenvr I] [F F F]

Parameters
ObjOpenvr: Openvr 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 1027 of file scolplugin.cpp.

◆ _GetOpenvrControllerAxis()

int _GetOpenvrControllerAxis ( mmachine  m)

_GetOpenvrControllerAxis : Get the Openvr controller axis values Axis order is touch pad X, touch pad Y, trigger Z

fun [ObjOpenvr I] [F F F]

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

Definition at line 1150 of file scolplugin.cpp.

◆ _GetOpenvrControllerButtons()

int _GetOpenvrControllerButtons ( mmachine  m)

_GetOpenvrControllerButtons : Get the Openvr controller buttons state button order in list is application menu, grip, A, touchpad, trigger

fun [ObjOpenvr I] [I r1]

Parameters
ObjOpenvr: Openvr 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 1086 of file scolplugin.cpp.

◆ _GetOpenvrControllerOrientation()

int _GetOpenvrControllerOrientation ( mmachine  m)

_GetOpenvrControllerOrientation : Get the Openvr controller orientation

fun [ObjOpenvr I] [F F F F]

Parameters
ObjOpenvr: Openvr 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 910 of file scolplugin.cpp.

◆ _GetOpenvrControllerPosition()

int _GetOpenvrControllerPosition ( mmachine  m)

_GetOpenvrControllerPosition : Get the Openvr controller position

fun [ObjOpenvr I] [F F F]

Parameters
ObjOpenvr: Openvr 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 852 of file scolplugin.cpp.

◆ _GetOpenvrControllerVelocity()

int _GetOpenvrControllerVelocity ( mmachine  m)

_GetOpenvrControllerVelocity : Get the Openvr controller velocity

fun [ObjOpenvr I] [F F F]

Parameters
ObjOpenvr: Openvr 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 969 of file scolplugin.cpp.

◆ _GetOpenvrControllerVisibility()

int _GetOpenvrControllerVisibility ( mmachine  m)

_GetOpenvrControllerVisibility : Get the Openvr controller visibility state

fun [ObjOpenvr I] I

Parameters
ObjOpenvr: Openvr 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 803 of file scolplugin.cpp.

◆ _GetOpenvrDeviceName()

int _GetOpenvrDeviceName ( mmachine  m)

_GetOpenvrDeviceName : Get the openvr device type

fun [ObjOpenvr] S

Parameters
ObjOpenvr: Openvr Object
Returns
S : device name, NIL otherwise

Definition at line 598 of file scolplugin.cpp.

◆ _GetOpenvrFovY()

int _GetOpenvrFovY ( mmachine  m)

_GetOpenvrFovY : Get the Openvr eye spacing

fun [ObjOpenvr] F

Parameters
ObjOpenvr: Openvr Object
Returns
F : FovY on success, NIL otherwise

Definition at line 443 of file scolplugin.cpp.

◆ _GetOpenvrIPD()

int _GetOpenvrIPD ( mmachine  m)

_GetOpenvrIPD : Get the Openvr eye spacing

fun [ObjOpenvr] F

Parameters
ObjOpenvr: Openvr Object
Returns
F : IPD on success, NIL otherwise

Definition at line 408 of file scolplugin.cpp.

◆ _GetOpenvrOrientation()

int _GetOpenvrOrientation ( mmachine  m)

_GetOpenvrOrientation : Get the Openvr sensor orientation

fun [ObjOpenvr] [F F F F]

Parameters
ObjOpenvr: Openvr Object
Returns
[F F F F] : the orientation quaternion if success, NIL otherwise

Definition at line 268 of file scolplugin.cpp.

◆ _GetOpenvrPosition()

int _GetOpenvrPosition ( mmachine  m)

_GetOpenvrPosition : Get the Openvr position from the IR camera

fun [ObjOpenvr] [F F F]

Parameters
ObjOpenvr: Openvr Object
Returns
[F F F] : the position if success, NIL otherwise

Definition at line 321 of file scolplugin.cpp.

◆ _GetOpenvrProjectionMatrix()

int _GetOpenvrProjectionMatrix ( mmachine  m)

_GetOpenvrProjectionMatrix : Get the Openvr camera projection matrix

fun [ObjOpenvr 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
ObjOpenvr: Openvr 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 632 of file scolplugin.cpp.

◆ _GetOpenvrTextureSize()

int _GetOpenvrTextureSize ( mmachine  m)

_GetOpenvrTextureSize : Get the Openvr texture size for RTT

fun [ObjOpenvr] [I I]

Parameters
ObjOpenvr: Openvr Object
Returns
[I I] : the texture size if success, NIL otherwise

Definition at line 754 of file scolplugin.cpp.

◆ _GetOpenvrVisibility()

int _GetOpenvrVisibility ( mmachine  m)

_GetOpenvrVisibility : Get the Openvr HMD visibility state

fun [ObjOpenvr] I

Parameters
ObjOpenvr: Openvr Object
Returns
I : 1 if visible 0 if not, NIL otherwise

Definition at line 232 of file scolplugin.cpp.

◆ _IsOpenvrCameraAvailable()

int _IsOpenvrCameraAvailable ( mmachine  m)

_IsOpenvrCameraAvailable : Get the Openvr camera availability

fun [ObjOpenvr] I

Parameters
ObjOpenvr: Openvr Object
Returns
I : 1 if a camera is available, 0 if not, NIL otherwise

Definition at line 1262 of file scolplugin.cpp.

◆ _OpenOpenvrCamera()

int _OpenOpenvrCamera ( mmachine  m)

_OpenOpenvrCamera : Open the Openvr camera to get size and frames later

fun [ObjOpenvr] I

Parameters
ObjOpenvr: Openvr Object
Returns
I : 1 if a camera enable, 0 if not, NIL otherwise

Definition at line 1298 of file scolplugin.cpp.

◆ _ResetOpenvrDevice()

int _ResetOpenvrDevice ( mmachine  m)

_ResetOpenvrDevice : Reset Openvr sensor

fun [ObjOpenvr] I

Parameters
ObjOpenvr: Openvr Object
Returns
I : 0 if success, NIL otherwise

Definition at line 478 of file scolplugin.cpp.

◆ _SetOpenvrControllerRumble()

int _SetOpenvrControllerRumble ( mmachine  m)

_SetOpenvrControllerRumble : Set the Openvr controller rumble value

fun [ObjOpenvr I F] I

Parameters
ObjOpenvr: Openvr 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 1209 of file scolplugin.cpp.

◆ _UpdateOpenvr()

int _UpdateOpenvr ( mmachine  m)

_UpdateOpenvr : start Openvr update you should call this on each render frame

fun [ObjOpenvr] I

Parameters
ObjOpenvr: Openvr Object
Returns
I : 1 if updated 0 if not, NIL otherwise

Definition at line 515 of file scolplugin.cpp.

◆ _UpdateOpenvrTextures()

int _UpdateOpenvrTextures ( mmachine  m)

_UpdateOpenvrTextures : Update the HMD textures pointer

fun[ObjOpenvr ObjPtr ObjPtr I] I

Parameters
ObjOpenvr: Openvr Object
ObjPtr: Left texture pointer from 3D engine
ObjPtr: Right texture pointer from 3D engine
I: Texture type (0 opengl, 1 directX9)
Returns
I : 1 if updated 0 if not, NIL otherwise

Definition at line 550 of file scolplugin.cpp.