Basic framework to design VR applications. More...
Public Member Functions | |
COgreVRApplication (const char *sResourceRoot) | |
Default constructor. | |
virtual | ~COgreVRApplication () |
Destructor. | |
virtual void | go (void) |
Launches the application (engine setup, initialization, rendering start). | |
Protected Member Functions | |
virtual bool | setup (void) |
Main Ogre and custom setup steps. | |
virtual bool | configure (void) |
Configuration management. | |
virtual void | setupResources (void) |
Parsing of the resource configuration file. | |
virtual bool | initialise (void)=0 |
Initialize the scene. This function has to be implemented with the specific Ogre code. | |
virtual bool | process (double timeSinceLastProcess)=0 |
Main loop. Developer has to implement this function with the specific behaviour of its a application. | |
bool | frameStarted (const Ogre::FrameEvent &evt) |
Frame started callback. | |
bool | frameEnded (const Ogre::FrameEvent &evt) |
Frame ended callback. | |
virtual bool | initOIS (void) |
Initialize the OIS plugin. | |
bool | mouseMoved (const OIS::MouseEvent &arg) |
Mouse moved callback, launched when the mouse is moved. | |
bool | mousePressed (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
Mouse pressed callback, launched when a mouse button is pressed. | |
bool | mouseReleased (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
Mouse released callback, launched when a mouse button is released. | |
bool | keyPressed (const OIS::KeyEvent &evt) |
Key pressed callback, launched when a key is pressed. | |
bool | keyReleased (const OIS::KeyEvent &evt) |
Key released callback, launched when a key is released. | |
virtual bool | initCEGUI (const char *logFileName) |
Initialize the CEGUI plugin. | |
Protected Attributes | |
bool | m_bContinue |
Tells if the rendering process should continue after the current frame. | |
Ogre::Root * | m_poRoot |
Ogre root. | |
Ogre::SceneManager * | m_poSceneManager |
The scene manager used. | |
Ogre::RenderWindow * | m_poWindow |
The render window used. | |
Ogre::Camera * | m_poCamera |
The camera used. | |
Ogre::SceneNode * | m_poCameraNode |
The camera node. | |
Ogre::String | m_sResourcePath |
Path to the file resource.cfg for Ogre. | |
OIS::InputManager * | m_poInputManager |
The OIS input manager. | |
OIS::Mouse * | m_poMouse |
The mouse. | |
OIS::Keyboard * | m_poKeyboard |
The keyboard. | |
CEGUI::OgreRenderer * | m_rGUIRenderer |
The CEGUI renderer. | |
CEGUI::WindowManager * | m_poGUIWindowManager |
The CEGUI window manager. | |
CEGUI::Window * | m_poSheet |
The default sheet. | |
CAbstractVrpnPeripheral * | m_poVrpnPeripheral |
A VRPN peripheric, handles at most one Analog + one Button server. | |
double | m_dClock |
Clock to impose a maximum frequency. |
Detailed Description
Basic framework to design VR applications.
- Date:
- 2010-02-16
This class is based on Ogre3D, and should be derived to design a specific VR application. It handles the rendering engine setup and configuration. Developer has to initialise the right 3D scene, and give the loop code that will be called each time a frame is rendered.
Member Function Documentation
virtual bool setup | ( | void | ) | [protected, virtual] |
Main Ogre and custom setup steps.
- Returns:
- true if the setup is a success.
virtual bool configure | ( | void | ) | [protected, virtual] |
Configuration management.
- Returns:
- true if the configuration step is a success.
virtual bool initialise | ( | void | ) | [protected, pure virtual] |
Initialize the scene. This function has to be implemented with the specific Ogre code.
- Returns:
- true if the initialization process is a success.
virtual bool process | ( | double | timeSinceLastProcess | ) | [protected, pure virtual] |
Main loop. Developer has to implement this function with the specific behaviour of its a application.
- Returns:
- true if the configuration step is a success.
bool frameEnded | ( | const Ogre::FrameEvent & | evt | ) | [inline, protected] |
Frame ended callback.
- Returns:
- true if the rendering engine should continue.
virtual bool initOIS | ( | void | ) | [protected, virtual] |
Initialize the OIS plugin.
- Returns:
- true if the setup is a success.
bool mouseMoved | ( | const OIS::MouseEvent & | arg | ) | [protected] |
Mouse moved callback, launched when the mouse is moved.
- Returns:
- true if the rendering engine should continue.
bool mousePressed | ( | const OIS::MouseEvent & | arg, |
OIS::MouseButtonID | id | ||
) | [inline, protected] |
Mouse pressed callback, launched when a mouse button is pressed.
- Returns:
- true if the rendering engine should continue.
bool mouseReleased | ( | const OIS::MouseEvent & | arg, |
OIS::MouseButtonID | id | ||
) | [inline, protected] |
Mouse released callback, launched when a mouse button is released.
- Returns:
- true if the rendering engine should continue.
bool keyPressed | ( | const OIS::KeyEvent & | evt | ) | [protected] |
Key pressed callback, launched when a key is pressed.
- Returns:
- true if the rendering engine should continue.
bool keyReleased | ( | const OIS::KeyEvent & | evt | ) | [protected] |
Key released callback, launched when a key is released.
- Returns:
- true if the rendering engine should continue.
virtual bool initCEGUI | ( | const char * | logFileName | ) | [protected, virtual] |
Initialize the CEGUI plugin.
- Returns:
- true if the setup is a success.
Generated on Tue Jun 26 2012 15:25:54 for Documentation by 1.7.4