QVR 4.1.0
A library to build Virtual Reality applications
|
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. | |
void | createDefault (bool preferCustomNavigation, Autodetect autodetect=AutodetectAll) |
Create a default configuration. | |
bool | readFromFile (const QString &filename) |
Read a configuration file. | |
const QList< QVRDeviceConfig > & | deviceConfigs () const |
Returns the list of device configurations. | |
const QList< QVRObserverConfig > & | observerConfigs () const |
Returns the list of observer configurations. | |
const QList< QVRProcessConfig > & | processConfigs () const |
Returns the list of process configurations. | |
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.
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.
QVRConfig::QVRConfig | ( | ) |
Constructor.
void QVRConfig::createDefault | ( | bool | preferCustomNavigation, |
Autodetect | autodetect = AutodetectAll ) |
Create a default configuration.
preferCustomNavigation | Use custom navigation for the default observer if feasible. |
autodetect | Specify 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.
|
inline |
Returns the list of device configurations.
|
inline |
Returns the list of observer configurations.
|
inline |
Returns the list of process configurations.
bool QVRConfig::readFromFile | ( | const QString & | filename | ) |
Read a configuration file.
filename | The name of the configuration file. |