Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.VRSystem Class Reference

VR system. More...

Inheritance diagram for Dragengine.VRSystem:

Static Public Member Functions

Management
static bool runtimeUsable ()
 VR Runtime is usable.
static void requestFeatureEyeGazeTracking (VRFeatureSupportLevel level)
 Set feature request level for eye gaze tracking.
static void requestFeatureFacialTracking (VRFeatureSupportLevel level)
 Set feature request level for facial tracking.
static void requestFeatureBodyTracking (VRFeatureSupportLevel level)
 Set feature request level for body tracking.
static bool supportsEyeGazeTracking ()
 Eye gaze tracking is supported.
static bool supportsFacialTracking ()
 Facial tracking is supported.
static bool supportsBodyTracking ()
 Body tracking is supported.
static void startRuntime ()
 Start VR.
static void stopRuntime ()
 Stop VR.
static bool isRuntimeRunning ()
 VR is running.
static Camera getCamera ()
 Camera to render on head mounted display or null.
static void setCamera (Camera camera)
 Set camera to render on head mounted display.
static bool supportsPassthrough ()
 VR Runtime supports presenting user environment inside the rendered world.
static bool getEnablePassthrough ()
 Presenting user environment inside the rendered world is enabled.
static void setEnablePassthrough (bool enable)
 Enable presenting user environment inside the rendered world.
static float getPassthroughTransparency ()
 Transparency of user environment presented inside the rendered world.
static void setPassthroughTransparency (float transparency)
 Set transparency of user environment presented inside the rendered world.
static void centerPlayspace ()
 Center playspace with forward direction matching looking direction.
Input devices
static int getDeviceCount ()
 Number of input devices.
static InputDevice getDeviceAt (int index)
 Information for input device at index.
static int indexOfDeviceWithID (String id)
 Index of device with identifier or -1 if absent.
static int indexOfButtonWithID (int device, String id)
 Index of button with identifier on device at index or -1 if absent.
static int indexOfAxisWithID (int device, String id)
 Index of axis with identifier on device at index or -1 if absent.
static int indexOfFeedbackWithID (int device, String id)
 Index of feedback with identifier on device at index or -1 if absent.
static bool getButtonPressed (int device, int button)
 Button at index on device at index is pressed down.
static bool getButtonTouched (int device, int button)
 Button at index on device at index is touched.
static bool getButtonNear (int device, int button)
 User finger is near button at index on device at index.
static float getAxisValue (int device, int axis)
 Value of axis at index on device at index.
static float getFeedbackValue (int device, int feedback)
 Value of feedback at index on device at index.
static void setFeedbackValue (int device, int feedback, float value)
 Set value of feedback at index on device at index.
Parameters
static int getParameterCount ()
 Number of parameters available.
static ModuleParameter getParameterInfo (int index)
 Parameter information.
static ModuleParameter getParameterInfo (String name)
 Named parameter information or null if not found.
static String getParameterValue (String name)
 Parameter value.
static void setParameterValue (String name, String value)
 Set named parameter value.
static String sendCommand (String command)
 Send command.

Detailed Description

VR system.

Version
1.6

This is a native class. This is a pure static class. The class can not be instantiated

Member Function Documentation

◆ centerPlayspace()

void Dragengine.VRSystem.centerPlayspace ( )
static

Center playspace with forward direction matching looking direction.

Version
1.28

Has no effect if runtime is not running.

Playspace is not automatically centered after starting the VR runtime. Call this function any time later to center the playspace, for example if the player adjusted seating position or if the VR runtime uses a broken playspace orientation.

References getPassthroughTransparency().

Referenced by getButtonPressed().

◆ getAxisValue()

float Dragengine.VRSystem.getAxisValue ( int device,
int axis )
static

Value of axis at index on device at index.

References getDeviceAt().

Referenced by sendCommand().

◆ getButtonNear()

bool Dragengine.VRSystem.getButtonNear ( int device,
int button )
static

User finger is near button at index on device at index.

Version
1.28

References getDeviceCount().

Referenced by sendCommand().

◆ getButtonPressed()

bool Dragengine.VRSystem.getButtonPressed ( int device,
int button )
static

Button at index on device at index is pressed down.

References centerPlayspace().

Referenced by getParameterInfo().

◆ getButtonTouched()

bool Dragengine.VRSystem.getButtonTouched ( int device,
int button )
static

Button at index on device at index is touched.

Referenced by getParameterValue().

◆ getCamera()

Camera Dragengine.VRSystem.getCamera ( )
static

Camera to render on head mounted display or null.

Referenced by supportsPassthrough().

◆ getDeviceAt()

InputDevice Dragengine.VRSystem.getDeviceAt ( int index)
static

Information for input device at index.

References setPassthroughTransparency().

Referenced by getAxisValue().

◆ getDeviceCount()

int Dragengine.VRSystem.getDeviceCount ( )
static

Number of input devices.

Referenced by getButtonNear().

◆ getEnablePassthrough()

bool Dragengine.VRSystem.getEnablePassthrough ( )
static

Presenting user environment inside the rendered world is enabled.

Version
1.12

Returns false if SupportsPassthrough() returns false.

References setCamera().

Referenced by getPassthroughTransparency().

◆ getFeedbackValue()

float Dragengine.VRSystem.getFeedbackValue ( int device,
int feedback )
static

Value of feedback at index on device at index.

Referenced by sendCommand().

◆ getParameterCount()

int Dragengine.VRSystem.getParameterCount ( )
static

Number of parameters available.

References indexOfAxisWithID().

Referenced by sendCommand().

◆ getParameterInfo() [1/2]

ModuleParameter Dragengine.VRSystem.getParameterInfo ( int index)
static

Parameter information.

Exceptions
EOutOfBoundaryindex less than 0 or greater than or equal to getParameterCount().

References indexOfFeedbackWithID().

Referenced by sendCommand().

◆ getParameterInfo() [2/2]

ModuleParameter Dragengine.VRSystem.getParameterInfo ( String name)
static

Named parameter information or null if not found.

References getButtonPressed().

◆ getParameterValue()

String Dragengine.VRSystem.getParameterValue ( String name)
static

Parameter value.

Exceptions
EInvalidParamParameter with name not found.

References getButtonTouched().

Referenced by sendCommand().

◆ getPassthroughTransparency()

float Dragengine.VRSystem.getPassthroughTransparency ( )
static

Transparency of user environment presented inside the rendered world.

Version
1.12

Has no effect if SupportsPassthrough() returns false. A value of 0 hides the environment. A value of 1 shows the environment. Values in between blend over.

References getEnablePassthrough().

Referenced by centerPlayspace().

◆ indexOfAxisWithID()

int Dragengine.VRSystem.indexOfAxisWithID ( int device,
String id )
static

Index of axis with identifier on device at index or -1 if absent.

Referenced by getParameterCount().

◆ indexOfButtonWithID()

int Dragengine.VRSystem.indexOfButtonWithID ( int device,
String id )
static

Index of button with identifier on device at index or -1 if absent.

Referenced by setFeedbackValue().

◆ indexOfDeviceWithID()

int Dragengine.VRSystem.indexOfDeviceWithID ( String id)
static

Index of device with identifier or -1 if absent.

Referenced by setFeedbackValue().

◆ indexOfFeedbackWithID()

int Dragengine.VRSystem.indexOfFeedbackWithID ( int device,
String id )
static

Index of feedback with identifier on device at index or -1 if absent.

Referenced by getParameterInfo().

◆ isRuntimeRunning()

bool Dragengine.VRSystem.isRuntimeRunning ( )
static

VR is running.

Version
1.8

VR systems typically are required to be activated before they can be used. Starting VR connects the engine to the VR system present on the host system and activates VR support on various modules. VR mode can be started and stopped at any time.

References stopRuntime().

Referenced by setCamera().

◆ requestFeatureBodyTracking()

void Dragengine.VRSystem.requestFeatureBodyTracking ( VRFeatureSupportLevel level)
static

Set feature request level for body tracking.

Version
1.31

Body tracking provides the pose of body as input device bones. Estimating bode pose is an expensive operation running on the headset. The majority of games and applications do not require body tracking. To enable set the feature request level to VRFeatureSupportLevel#optional or VRFeatureSupportLevel#required.

The set feature request level takes effect only the next time startRuntime() is called. It has no effect while the VR runtime is running.

If the VR module does not support body tracking and VRFeatureSupportLevel#required is specified an exception is thrown.

References requestFeatureBodyTracking().

Referenced by requestFeatureBodyTracking().

◆ requestFeatureEyeGazeTracking()

void Dragengine.VRSystem.requestFeatureEyeGazeTracking ( VRFeatureSupportLevel level)
static

Set feature request level for eye gaze tracking.

Version
1.17

Tracking eye gaze features is consider a high privacy operation by most VR environments. Enabling this feature usually requires the user to explicitely agree. Furthermore eye gaze tracking is not required for the majority of games and applications. For these reasons eye gaze tracking is disabled by default. To enable set the feature request level to VRFeatureSupportLevel#optional or VRFeatureSupportLevel#required.

The set feature request level takes effect only the next time StartRuntime() is called. It has no effect while the VR runtime is running.

If the VR module does not support eye gaze tracking and VRFeatureSupportLevel#required is specified an exception is thrown.

References requestFeatureEyeGazeTracking().

Referenced by requestFeatureEyeGazeTracking().

◆ requestFeatureFacialTracking()

void Dragengine.VRSystem.requestFeatureFacialTracking ( VRFeatureSupportLevel level)
static

Set feature request level for facial tracking.

Version
1.17

Facial tracking includes eye tracking and mouth tracking. Tracking facial features is consider a high privacy operation by most VR environments. Enabling this feature usually requires the user to explicitely agree. Furthermore facial tracking typically is an expensive operation and can degrade performance. Last but not least facial tracking is not required for the majority of games and applications. For this reason facial tracking is disabled by default. To enable set the feature request level to VRFeatureSupportLevel#optional or VRFeatureSupportLevel#required.

The set feature request level takes effect only the next time StartRuntime() is called. It has no effect while the VR runtime is running.

If the VR module does not support facial tracking and VRFeatureSupportLevel#required is specified an exception is thrown.

References requestFeatureFacialTracking().

Referenced by requestFeatureFacialTracking().

◆ runtimeUsable()

bool Dragengine.VRSystem.runtimeUsable ( )
static

VR Runtime is usable.

Returns true if a call to startRuntime() is likely to succeed or not.

References runtimeUsable().

Referenced by runtimeUsable().

◆ sendCommand()

String Dragengine.VRSystem.sendCommand ( String command)
static

◆ setCamera()

void Dragengine.VRSystem.setCamera ( Camera camera)
static

Set camera to render on head mounted display.

If set to null fades back to safe scene as defined by VR Runtime.

References isRuntimeRunning().

Referenced by getEnablePassthrough().

◆ setEnablePassthrough()

void Dragengine.VRSystem.setEnablePassthrough ( bool enable)
static

Enable presenting user environment inside the rendered world.

Version
1.12

Has no effect if SupportsPassthrough() returns false.

References supportsPassthrough().

Referenced by setPassthroughTransparency().

◆ setFeedbackValue()

void Dragengine.VRSystem.setFeedbackValue ( int device,
int feedback,
float value )
static

Set value of feedback at index on device at index.

References indexOfButtonWithID(), and indexOfDeviceWithID().

Referenced by sendCommand().

◆ setParameterValue()

void Dragengine.VRSystem.setParameterValue ( String name,
String value )
static

Set named parameter value.

Exceptions
EInvalidParamParameter with name not found.

Referenced by sendCommand().

◆ setPassthroughTransparency()

void Dragengine.VRSystem.setPassthroughTransparency ( float transparency)
static

Set transparency of user environment presented inside the rendered world.

Version
1.12

Has no effect if SupportsPassthrough() returns false. A value of 0 hides the environment. A value of 1 shows the environment. Values in between blend over.

References setEnablePassthrough().

Referenced by getDeviceAt().

◆ startRuntime()

void Dragengine.VRSystem.startRuntime ( )
static

Start VR.

VR systems typically are required to be activated before they can be used. Starting VR connects the engine to the VR system present on the host system and activates VR support on various modules. VR mode can be started and stopped at any time.

Referenced by stopRuntime().

◆ stopRuntime()

void Dragengine.VRSystem.stopRuntime ( )
static

Stop VR.

VR systems typically are required to be activated before they can be used. Starting VR connects the engine to the VR system present on the host system and activates VR support on various modules. VR mode can be started and stopped at any time.

References startRuntime().

Referenced by isRuntimeRunning().

◆ supportsBodyTracking()

bool Dragengine.VRSystem.supportsBodyTracking ( )
static

Body tracking is supported.

Version
1.31

Can be called after startRuntime() returned successfully. Returns true if body tracking has been requested and is supported by the VR runtime.

References supportsBodyTracking().

Referenced by supportsBodyTracking().

◆ supportsEyeGazeTracking()

bool Dragengine.VRSystem.supportsEyeGazeTracking ( )
static

Eye gaze tracking is supported.

Version
1.31

Can be called after startRuntime() returned successfully. Returns true if eye gaze tracking has been requested and is supported by the VR runtime.

References supportsEyeGazeTracking().

Referenced by supportsEyeGazeTracking().

◆ supportsFacialTracking()

bool Dragengine.VRSystem.supportsFacialTracking ( )
static

Facial tracking is supported.

Version
1.31

Can be called after startRuntime() returned successfully. Returns true if facial tracking has been requested and is supported by the VR runtime.

References supportsFacialTracking().

Referenced by supportsFacialTracking().

◆ supportsPassthrough()

bool Dragengine.VRSystem.supportsPassthrough ( )
static

VR Runtime supports presenting user environment inside the rendered world.

Version
1.12

References getCamera().

Referenced by setEnablePassthrough().


The documentation for this class was generated from the following file: