QVR 4.1.0
A library to build Virtual Reality applications
|
Manager of the QVR application's control flow and its processes and windows. More...
#include <manager.hpp>
Inherits QObject.
Static Public Member Functions | |
Configuration access. | |
This is only guaranteed to work after a successfull call to init(). See isInitialized(). | |
static QVRLogLevel | logLevel () |
Return the log level. | |
static const QVRConfig & | config () |
Return the active configuration. | |
static int | deviceCount () |
Return the number of devices in the configuration. | |
static const QVRDeviceConfig & | deviceConfig (int deviceIndex) |
Return the configuration of the device with index deviceIndex. | |
static int | observerCount () |
Return the number of observers in the configuration. | |
static const QVRObserverConfig & | observerConfig (int observerIndex) |
Return the configuration of the observer with index observerIndex. | |
static int | processCount () |
Return the number of processes in the configuration. | |
static int | processIndex () |
Return the index of the running process. The process with index 0 is the main process. | |
static const QVRProcessConfig & | processConfig (int pi=processIndex()) |
Return the configuration of the process with the index pi. | |
static int | windowCount (int pi=processIndex()) |
Return the number of windows in the configuration of the process with index pi. | |
static const QVRWindowConfig & | windowConfig (int processIndex, int windowIndex) |
Return the configuration of the window with the index windowIndex on the process with index processIndex. | |
Object access | |
static const QVRDevice & | device (int deviceIndex) |
Return the device with index deviceIndex. See deviceCount(). | |
static const QVRObserver & | observer (int observerIndex) |
Return the observer with index observerIndex. See observerCount(). | |
static const QVRProcess & | process () |
Return the process. Only the running process is accessible in this way. See processIndex(). | |
static const QVRWindow & | window (int windowIndex) |
Return the window with the given index in the running process. | |
Renderable device models | |
See the documentation of QVRDevice for information on how to use this model data to render representations of interaction devices into the virtual world. The data returned by these functions does not change, so you can upload it once to the GPU and reuse it. | |
static int | deviceModelVertexDataCount () |
Return the number of vertex data blocks. | |
static int | deviceModelVertexCount (int vertexDataIndex) |
Return the number of vertices in vertex data block vertexDataIndex. | |
static const float * | deviceModelVertexPositions (int vertexDataIndex) |
Return the vertex positions in vertex data block vertexDataIndex. Each position consists of three values (x, y, z). | |
static const float * | deviceModelVertexNormals (int vertexDataIndex) |
Return the vertex normals in vertex data block vertexDataIndex. Each normal consists of three values (nx, ny, nz). | |
static const float * | deviceModelVertexTexCoords (int vertexDataIndex) |
Return the vertex texture coordinates in vertex data block vertexDataIndex. Each texture coordinate consists of two values (u, v). | |
static int | deviceModelVertexIndexCount (int vertexDataIndex) |
Return the number of vertex indices in vertex data block vertexDataIndex. | |
static const unsigned short * | deviceModelVertexIndices (int vertexDataIndex) |
Return the vertex indices in vertex data block vertexDataIndex. | |
static int | deviceModelTextureCount () |
Return the number of textures. | |
static const QImage & | deviceModelTexture (int textureIndex) |
Return the texture textureIndex. | |
Friends | |
void | QVRMsg (QVRLogLevel level, const char *s) |
Constructor, Destructor, Initialization | |
QVRManager (int &argc, char *argv[]) | |
This constructor creates the manager object. | |
~QVRManager () | |
Destructor. | |
bool | init (QVRApp *app, bool preferCustomNavigation=false) |
Initialize the QVR application. | |
static QVRManager * | instance () |
Return the QVR manager instance. | |
static bool | isInitialized () |
Returns whether the manager was successfully initialized. | |
Manager of the QVR application's control flow and its processes and windows.
The QVRManager object is typically created right after the QApplication object. Afterwards, the application typically sets its preferred OpenGL context properties, and then initializes the QVRManager object:
QVRManager::QVRManager | ( | int & | argc, |
char * | argv[] ) |
This constructor creates the manager object.
The following command line options are intereted by the QVR manager and removed from argc and argv:
QVRManager::~QVRManager | ( | ) |
Destructor.
|
static |
Return the active configuration.
|
static |
Return the device with index deviceIndex. See deviceCount().
|
inlinestatic |
Return the configuration of the device with index deviceIndex.
This is a convenience function, you can also get this information from config().
|
inlinestatic |
Return the number of devices in the configuration.
This is a convenience function, you can also get this information from config().
|
static |
Return the texture textureIndex.
|
static |
Return the number of textures.
|
static |
Return the number of vertices in vertex data block vertexDataIndex.
|
static |
Return the number of vertex data blocks.
|
static |
Return the number of vertex indices in vertex data block vertexDataIndex.
|
static |
Return the vertex indices in vertex data block vertexDataIndex.
|
static |
Return the vertex normals in vertex data block vertexDataIndex. Each normal consists of three values (nx, ny, nz).
|
static |
Return the vertex positions in vertex data block vertexDataIndex. Each position consists of three values (x, y, z).
|
static |
Return the vertex texture coordinates in vertex data block vertexDataIndex. Each texture coordinate consists of two values (u, v).
bool QVRManager::init | ( | QVRApp * | app, |
bool | preferCustomNavigation = false ) |
Initialize the QVR application.
app | The QVR application. |
preferCustomNavigation | Whether the application prefers its own navigation methods. |
This function will create all child processes and all windows, depending on the QVR configuration, and it will call the initialization functions of app.
Applications that implement their own navigation methods in QVRApp::update() should set the preferCustomNavigation flag.
|
static |
Return the QVR manager instance.
There can be only one instance of QVRManager. This function returns it.
|
static |
Returns whether the manager was successfully initialized.
|
static |
Return the log level.
|
static |
Return the observer with index observerIndex. See observerCount().
|
inlinestatic |
Return the configuration of the observer with index observerIndex.
This is a convenience function, you can also get this information from config().
|
inlinestatic |
Return the number of observers in the configuration.
This is a convenience function, you can also get this information from config().
|
static |
Return the process. Only the running process is accessible in this way. See processIndex().
|
inlinestatic |
Return the configuration of the process with the index pi.
This is a convenience function, you can also get this information from config().
|
inlinestatic |
Return the number of processes in the configuration.
This is a convenience function, you can also get this information from config().
|
static |
Return the index of the running process. The process with index 0 is the main process.
|
static |
Return the window with the given index in the running process.
|
inlinestatic |
Return the configuration of the window with the index windowIndex on the process with index processIndex.
This is a convenience function, you can also get this information from config().
|
inlinestatic |
Return the number of windows in the configuration of the process with index pi.
This is a convenience function, you can also get this information from config().
|
friend |