Drag[en]gine Game Engine  1.21
deVRSystem Class Reference

VR system. More...

#include <deVRSystem.h>

Inheritance diagram for deVRSystem:
deBaseSystem

Public Member Functions

Constructors and Destructors
 deVRSystem (deEngine *engine)
 Create vr system. More...
 
virtual ~deVRSystem ()
 Clean up vr system. More...
 
Management
deBaseVRModuleGetActiveModule () const
 Active module or nullptr if none is active. More...
 
deInputEventQueueGetEventQueue ()
 VR queue. More...
 
const deInputEventQueueGetEventQueue () const
 
void ProcessEvents ()
 Add events to the VR System event queue. More...
 
bool RuntimeUsable ()
 VR Runtime is usable. More...
 
void RequestFeatureEyeGazeTracking (deBaseVRModule::eFeatureSupportLevel level)
 Set feature request level for eye gaze tracking. More...
 
void RequestFeatureFacialTracking (deBaseVRModule::eFeatureSupportLevel level)
 Set feature request level for facial tracking. More...
 
void StartRuntime ()
 Start VR. More...
 
void StopRuntime ()
 Stop VR. More...
 
deCameraGetCamera () const
 Camera to render on head mounted display or nullptr. More...
 
void SetCamera (deCamera *camera)
 Set camera to render on head mounted display. More...
 
bool SupportsPassthrough ()
 VR Runtime supports presenting user environment inside the rendered world. More...
 
bool GetEnablePassthrough () const
 Presenting user environment inside the rendered world is enabled. More...
 
void SetEnablePassthrough (bool enable)
 Enable presenting user environment inside the rendered world. More...
 
float GetPassthroughTransparency () const
 Transparency of user environment presented inside the rendered world. More...
 
void SetPassthroughTransparency (float transparency)
 Set transparency of user environment presented inside the rendered world. More...
 
Overloadables
virtual void SetActiveModule (deLoadableModule *module)
 Set active loadable module. More...
 
virtual void ClearPermanents ()
 Clearcross references and links that could lead to memory leaks. More...
 
virtual void PostStart ()
 Carry out here actions right after the system started up. More...
 
virtual void PreStop ()
 Carry out here actions right before the system shuts down. More...
 
- Public Member Functions inherited from deBaseSystem
 deBaseSystem (deEngine *engine, const char *systemName, int requiredModuleType)
 Create new base system linked to the given engine. More...
 
virtual ~deBaseSystem ()
 Clean up base system. More...
 
deEngineGetEngine () const
 Linked game engine. More...
 
deLoadableModuleGetActiveLoadableModule () const
 Active loadable module. More...
 
bool GetIsRunning () const
 System is running. More...
 
bool GetHasFailed () const
 System has failed during runtime. More...
 
const decStringGetSystemName () const
 System name. More...
 
virtual bool CanStart ()
 
void SetHasFailed (bool hasFailed)
 Set if system has failed. More...
 
virtual void Start ()
 Start system and the active loadable module. More...
 
virtual void Stop ()
 Stop system and the active loadable module. More...
 
void CheckAndActivateFirst (deModuleSystem::eModuleTypes type)
 Check if at least one module is working and select the first one. More...
 
void LogInfo (const char *message)
 Output information message on the console. More...
 
void LogInfoFormat (const char *message,...)
 Output formated information message on the console. More...
 
void LogInfoFormatUsing (const char *message, va_list args)
 Output formated information message on the console. More...
 
void LogWarn (const char *message)
 Output warning message on the console. More...
 
void LogWarnFormat (const char *message,...)
 Output formated warning message on the console. More...
 
void LogWarnFormatUsing (const char *message, va_list args)
 Output formated warning message on the console. More...
 
void LogError (const char *message)
 Output error message on the console. More...
 
void LogErrorFormat (const char *message,...)
 Output formated error message on the console. More...
 
void LogErrorFormatUsing (const char *message, va_list args)
 Output formated error message on the console. More...
 
void LogException (const deException &exception)
 Output exception as error message on the console. More...
 

Detailed Description

VR system.

Version
1.6

Constructor & Destructor Documentation

◆ deVRSystem()

deVRSystem::deVRSystem ( deEngine engine)

Create vr system.

◆ ~deVRSystem()

virtual deVRSystem::~deVRSystem ( )
virtual

Clean up vr system.

Member Function Documentation

◆ ClearPermanents()

virtual void deVRSystem::ClearPermanents ( )
virtual

Clearcross references and links that could lead to memory leaks.

Do not forget to call the super function.

Reimplemented from deBaseSystem.

◆ GetActiveModule()

deBaseVRModule* deVRSystem::GetActiveModule ( ) const
inline

Active module or nullptr if none is active.

◆ GetCamera()

deCamera* deVRSystem::GetCamera ( ) const
inline

Camera to render on head mounted display or nullptr.

◆ GetEnablePassthrough()

bool deVRSystem::GetEnablePassthrough ( ) const
inline

Presenting user environment inside the rendered world is enabled.

Version
1.12

Has no effect if SupportsPassthrough() returns false.

◆ GetEventQueue() [1/2]

deInputEventQueue& deVRSystem::GetEventQueue ( )
inline

VR queue.

◆ GetEventQueue() [2/2]

const deInputEventQueue& deVRSystem::GetEventQueue ( ) const
inline

◆ GetPassthroughTransparency()

float deVRSystem::GetPassthroughTransparency ( ) const
inline

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.

◆ PostStart()

virtual void deVRSystem::PostStart ( )
virtual

Carry out here actions right after the system started up.

Reimplemented from deBaseSystem.

◆ PreStop()

virtual void deVRSystem::PreStop ( )
virtual

Carry out here actions right before the system shuts down.

Reimplemented from deBaseSystem.

◆ ProcessEvents()

void deVRSystem::ProcessEvents ( )

Add events to the VR System event queue.

This function is called before any other frame related tasks are carried out. Record changes in devices states have to be recored into a game event reported as engine input events You are expected to check message and event queues to deliver system notification (like quitting the game) to the game engine.

◆ RequestFeatureEyeGazeTracking()

void deVRSystem::RequestFeatureEyeGazeTracking ( deBaseVRModule::eFeatureSupportLevel  level)

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 optional or 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 sFeatureSupport::efslRequired is specified an exception is thrown.

◆ RequestFeatureFacialTracking()

void deVRSystem::RequestFeatureFacialTracking ( deBaseVRModule::eFeatureSupportLevel  level)

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 optional or 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 sFeatureSupport::efslRequired is specified an exception is thrown.

◆ RuntimeUsable()

bool deVRSystem::RuntimeUsable ( )

VR Runtime is usable.

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

◆ SetActiveModule()

virtual void deVRSystem::SetActiveModule ( deLoadableModule module)
virtual

Set active loadable module.

Do not forget to call the super function.

Reimplemented from deBaseSystem.

◆ SetCamera()

void deVRSystem::SetCamera ( deCamera camera)

Set camera to render on head mounted display.

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

◆ SetEnablePassthrough()

void deVRSystem::SetEnablePassthrough ( bool  enable)

Enable presenting user environment inside the rendered world.

Version
1.12

Has no effect if SupportsPassthrough() returns false.

◆ SetPassthroughTransparency()

void deVRSystem::SetPassthroughTransparency ( float  transparency)

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.

◆ StartRuntime()

void deVRSystem::StartRuntime ( )

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.

◆ StopRuntime()

void deVRSystem::StopRuntime ( )

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.

◆ SupportsPassthrough()

bool deVRSystem::SupportsPassthrough ( )

VR Runtime supports presenting user environment inside the rendered world.

Version
1.12

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