OMKOgreVis.h

Go to the documentation of this file.
00001 /************************************************************************/
00002 /* This file is part of openMask(c) INRIA, CNRS, Universite de Rennes 1 */
00003 /* 1993-2002, thereinafter the Software                                 */
00004 /*                                                                      */
00005 /* The Software has been developped within the Siames Project.          */
00006 /* INRIA, the University of Rennes 1 and CNRS jointly hold intellectual */
00007 /* property rights                                                      */
00008 /*                                                                      */
00009 /* The Software has been registered with the Agence pour la Protection  */
00010 /* des Programmes (APP) under registration number                       */
00011 /* IDDN.FR.001.510008.00.S.P.2001.000.41200                             */
00012 /*                                                                      */
00013 /* This file may be distributed under the terms of the Q Public License */
00014 /* version 1.0 as defined by Trolltech AS of Norway and appearing in    */
00015 /* the file LICENSE.QPL included in the packaging of this file.         */
00016 /*                                                                      */
00017 /* Licensees holding valid specific licenses issued by INRIA, CNRS or   */
00018 /* Universite Rennes 1 for the software may use this file in            */
00019 /* acordance with that specific license                                 */
00020 /************************************************************************/
00021 #ifndef OMKOgreVis_H
00022 #define OMKOgreVis_H
00023 
00024 #include "OMKVisBase.h"
00025 #include <Ogre.h>
00026 
00027 #if ( OGRE_DEBUG_MEMORY_MANAGER == 1 )
00028 #error( "OGRE_DEBUG_MEMORY_MANAGER must be set to 0 in OgreConfig.h" )
00029 #endif
00030 
00031 namespace OMK
00032 {
00033         namespace Vis
00034         {
00051                 class OMKVIS_API OgreVis : public VisBase
00052                 {
00053                         DECLARE_OBJECT_FACTORY( OgreVis ) ;
00054 
00055                 public:
00056 
00058                         const Ogre::Root& getRoot( void ) const ;
00059 
00061                         Ogre::Root& touchRoot( void ) const  ;
00062 
00063                 private:
00064 
00066 
00067                         virtual void computeParameters() ;
00069 
00071 
00072 
00073 
00074 
00075 
00076 
00077 
00078                         virtual bool loadParameters( const ConfigurationParameterDescriptor * node ) ;
00079 
00081 
00084                         bool ogreInitialisation(        const std::string& pluginsFile, 
00085                                 const std::string& configurationFile, 
00086                                 const std::string& resourcesFile,
00087                                 const std::string& sceneManagerType,
00088                                 const std::string& windowName ) ;
00089 
00091                         void createSceneManager( const std::string& sceneManagerType ) ;
00092 
00094                         void createResourceListener( void ) ;
00095 
00097                         void addResourceLocations( const std::string& resourcesFile ) ;
00098 
00100                         void initResources( void ) ;
00101 
00103                         void loadSceneFile( const std::string& resourceGroupName, const std::string& sceneFileName ) ;
00104 
00109                         const std::string& initCamera( const std::string& cameraName ) ;
00110 
00112                         void createViewport( const std::string& cameraName ) ;
00113 
00115                         Ogre::Root* _root ;
00116                 } ;
00117 
00118                 //-------------------------------------------------------------------------
00119                 // getRoot
00120                 //-------------------------------------------------------------------------
00121                 inline const Ogre::Root&
00122                         OgreVis::getRoot( void ) const
00123                 {
00124                         return *_root ;
00125                 }
00126 
00127                 //-------------------------------------------------------------------------
00128                 // touchRoot
00129                 //-------------------------------------------------------------------------
00130                 inline Ogre::Root&
00131                         OgreVis::touchRoot( void ) const 
00132                 {
00133                         return const_cast < Ogre::Root& > ( *_root ) ;
00134                 }
00135         } // namespace Vis
00136 } // namespace OMK
00137 
00138 #endif

logo OpenMask

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

Generated with doxygen by Dimitri van Heesch ,   1997-2007