The visualisation of OpenMASK with Ogre

Ogre is choosen for the new visualisation.

The OgreVis encapsulates the Ogre root to manage the visualisation.

How Ogre is configured

To create the ogre root, the simulated object OgreVis needs three files, to find the plugins, to know the configuration and to get the resources.

Finding the plugins

Ogre needs a set of plugins to work. To find them, it reads a file which defines the path and the set of those plugins. The user has two ways to tell which configuration file the Ogre root has to use. Either he defines the Ogre root path, or he defines the complet path to the configuration file. In its UserParams, the OgreVis object must find one of this two fields:

Configuration examples

visuOgre
{
  Class OgreVis
  Scheduling
  {
    Frequency 60
  }
  UserParams
  {
    OgreHome "${OGRE_HOME}"
    ...
  }
  ...
}
where ${OGRE_HOME} is a environment variable set by the user.

or

visuOgre
{
  Class OgreVis
  Scheduling
  {
    Frequency 60
  }
  UserParams
  {
    PluginsCfg "${OGRE_HOME}/bin/debug/Plugins.cfg"
    ...
  }
  ...
}

Path policy to find plugins folder

When the OgreHome parameter is used, the plugins configuration file is looking in the following folders:
What to put in the plugin configuration file ?
The standard configuration file for plugins is this one (for Windows):

Plugins.cfg

# Defines plugins to load

# Define plugin folder
PluginFolder=. (1)

# Define plugins
Plugin=RenderSystem_Direct3D9 (2)
Plugin=RenderSystem_GL
Plugin=Plugin_ParticleFX
Plugin=Plugin_BSPSceneManager
Plugin=Plugin_OctreeSceneManager
Plugin=Plugin_CgProgramManager

It must be put in the same folder as the Ogre plugins.

Configuring Ogre

The user does not have to define the configuration, at the first run, Ogre opens a dialog to help the user to define the configuration. According to his choices, Ogre creates the configuration file.

Nevertheless there are two ways to define the location of the configuration file:

Setting the ressources

By default the file is resources.cfg in the current folder, but the user can change that by setting the field ResourcesFile in the user parameters of the OgreVis object.

In this file the resources are set in the [General] by default, the user can change that by setting the field ResourceGroup.

visuOgre
{
  Class OgreVis
  Scheduling
  {
    Frequency 60
  }
  UserParams
  {
    OgreHome "${OGRE_HOME}"
    ResourcesFile "myOwnResources.cfg"
    ResourceGroup "NotTheGeneral"
    ...
  }
  ...
}

Setting the scene

By default there is no scene file, but the user can change that by setting the field SceneFile in the user parameters of the OgreVis object.
visuOgre
{
  Class OgreVis
  Scheduling
  {
    Frequency 60
  }
  UserParams
  {
    OgreHome "${OGRE_HOME}"
    SceneFile "myOwnSceneFile"
    ...
  }
  ...
}

logo OpenMask

Documentation generated on Mon Jun 9 11:45:59 2008

Generated with doxygen by Dimitri van Heesch ,   1997-2007