QVR 4.0.1
A library to build Virtual Reality applications
Public Types | Public Member Functions | List of all members
QVRConfig Class Reference

QVR configuration of a Virtual Reality display setup. More...

#include <config.hpp>

Public Types

enum  AutodetectFlag {
  AutodetectOculus = (1 << 0) , AutodetectOpenVR = (1 << 1) , AutodetectGoogleVR = (1 << 2) , AutodetectGamepads = (1 << 3) ,
  AutodetectAll = 0xffffff
}
 Flags to enable autodetection of certain types of VR hardware. Note that these flags may be ignored, e.g. if QVR was built without support for a specific kind of hardware. More...
 

Public Member Functions

 QVRConfig ()
 Constructor. More...
 
void createDefault (bool preferCustomNavigation, Autodetect autodetect=AutodetectAll)
 Create a default configuration. More...
 
bool readFromFile (const QString &filename)
 Read a configuration file. More...
 
const QList< QVRDeviceConfig > & deviceConfigs () const
 Returns the list of device configurations. More...
 
const QList< QVRObserverConfig > & observerConfigs () const
 Returns the list of observer configurations. More...
 
const QList< QVRProcessConfig > & processConfigs () const
 Returns the list of process configurations. More...
 

Detailed Description

QVR configuration of a Virtual Reality display setup.

The configuration consists of a list of observer configurations and a list of process configurations. The process configurations define the windows that each process drives. Each window provides a view for exactly one observer.

Member Enumeration Documentation

◆ AutodetectFlag

Flags to enable autodetection of certain types of VR hardware. Note that these flags may be ignored, e.g. if QVR was built without support for a specific kind of hardware.

Enumerator
AutodetectOculus 

Autodetect Oculus Rift HMD and controllers.

AutodetectOpenVR 

Autodetect OpenVR-supported HMD and controllers (e.g. HTC Vive).

AutodetectGoogleVR 

Autodetect GoogleVR-supported HMDs and controllers (Cardboard, Daydream).

AutodetectGamepads 

Autodetect Gamepads via the QtGamepad module.

AutodetectAll 

Autodetect all hardware.

Constructor & Destructor Documentation

◆ QVRConfig()

QVRConfig::QVRConfig ( )

Constructor.

Member Function Documentation

◆ createDefault()

void QVRConfig::createDefault ( bool  preferCustomNavigation,
Autodetect  autodetect = AutodetectAll 
)

Create a default configuration.

Parameters
preferCustomNavigationUse custom navigation for the default observer if feasible.
autodetectSpecify which types of VR hardware to detect automatically.

This function will detect a head-mounted display and create a suitable configuration for it. If no special equipment is detected, the function will generate a single observer viewing a single window on the main process.

The observer created will a suitable default navigation type. If preferCustomNavigation is set, then the navigation type QVR_Navigation_Custom will be used if it makes sense.

Using the autodetect parameter only makes sense for developing / debugging; its default value should be fine.

◆ deviceConfigs()

const QList< QVRDeviceConfig > & QVRConfig::deviceConfigs ( ) const
inline

Returns the list of device configurations.

◆ observerConfigs()

const QList< QVRObserverConfig > & QVRConfig::observerConfigs ( ) const
inline

Returns the list of observer configurations.

◆ processConfigs()

const QList< QVRProcessConfig > & QVRConfig::processConfigs ( ) const
inline

Returns the list of process configurations.

◆ readFromFile()

bool QVRConfig::readFromFile ( const QString &  filename)

Read a configuration file.

Parameters
filenameThe name of the configuration file.
Returns
False on failure.

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