#include <OMKSceneDetailsExtension.h>
Inheritance diagram for OMK::Inp::SceneDetailsExtension:
Protected Member Functions | |
virtual void | action () |
The overwritten method. | |
Protected Attributes | |
Ogre::Camera * | _camera |
The camera to update. | |
int | _sceneDetailIndex |
The level of details. | |
Private Member Functions | |
DECLARE_EXTENSION_FACTORY (SceneDetailsExtension) | |
Factory and constructor/destructor. |
visualisation { Class OgreVis ... Extensions { sceneDetails { Class SceneDetails Key f3 // the default is "B" VisuName visualisation // the default is "visualisation" needed to create the key listener } ... } } *
There is two ways to change the display of the details.
the_sender_object->sendEvent( "visualisation", OMK::Inp::KeyListener::getKeyPressCode( "f3" ) ) ;
Definition at line 56 of file OMKSceneDetailsExtension.h.
OMK::Inp::SceneDetailsExtension::DECLARE_EXTENSION_FACTORY | ( | SceneDetailsExtension | ) | [private] |
Factory and constructor/destructor.
void OMK::Inp::SceneDetailsExtension::action | ( | ) | [protected, virtual] |
The overwritten method.
Switches the details level.
Reimplemented from OMK::Inp::GenericKeyExtension< OMK::Vis::OgreVis >.
Definition at line 27 of file OMKSceneDetailsExtension.cpp.
References _camera, OMK::ExtensionT< OMK::Vis::OgreVis >::_owner, _sceneDetailIndex, and OMK::Vis::OgreVis::touchRoot().
00028 { 00029 static Ogre::PolygonMode mode[] = { Ogre::PM_SOLID, Ogre::PM_WIREFRAME, Ogre::PM_POINTS } ; 00030 00031 _sceneDetailIndex = ( 2 == _sceneDetailIndex ) ? 0 :( _sceneDetailIndex + 1 ) ; 00032 00033 _camera = _camera ? _camera : ( _owner 00034 && _owner->touchRoot().getAutoCreatedWindow() 00035 && _owner->touchRoot().getAutoCreatedWindow()->getViewport( 0 ) ? 00036 _owner->touchRoot().getAutoCreatedWindow()->getViewport( 0 )->getCamera() : 0 ) ; 00037 if( _camera ) _camera->setPolygonMode( mode[ _sceneDetailIndex ] ) ; 00038 }
Ogre::Camera* OMK::Inp::SceneDetailsExtension::_camera [protected] |
The camera to update.
It is retrieved by dynamically casting the owner of the extension in setTheOwner method.
Definition at line 66 of file OMKSceneDetailsExtension.h.
Referenced by action().
The level of details.
Definition at line 71 of file OMKSceneDetailsExtension.h.
Referenced by action().
Documentation generated on Mon Jun 9 11:46:04 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |