#include <OMKOverlayExtension.h>
Inheritance diagram for OMK::Inp::OverlayExtension:
Protected Member Functions | |
void | action () |
Show/Hide Overlay. | |
virtual bool | loadExtensionParameters (const ConfigurationParameterDescriptor *node) |
Configuration parameters loader of Extension. | |
virtual void | preComputeParameters () |
Init Overlay. | |
Protected Attributes | |
Ogre::Overlay * | _overlay |
bool | _show |
bool | _init |
std::string | _overlayName |
Private Member Functions | |
DECLARE_EXTENSION_FACTORY (OverlayExtension) | |
Factory and constructor/destructor. |
This extension must be used as an extension of the OgreVis object. The creation is done dynamically through the following configuration:
visualisation { Class OgreVis ... Extensions { overlay { Class OverlayExtension OverlayName "Editor/DebugOverlay" Key d // the default is "d" VisuName visualisation } ... } }
Definition at line 44 of file OMKOverlayExtension.h.
OMK::Inp::OverlayExtension::DECLARE_EXTENSION_FACTORY | ( | OverlayExtension | ) | [private] |
Factory and constructor/destructor.
void OMK::Inp::OverlayExtension::action | ( | ) | [protected, virtual] |
Show/Hide Overlay.
This method toggles the display of the bouding boxes.
Reimplemented from OMK::Inp::GenericKeyExtension< OMK::Vis::OgreVis >.
Definition at line 44 of file OMKOverlayExtension.cpp.
References _overlay, and _show.
00045 { 00046 00047 //Have to wait for OgreVisInit 00048 if (_show) 00049 _overlay->hide(); 00050 else 00051 _overlay->show(); 00052 _show =!_show; 00053 }
bool OMK::Inp::OverlayExtension::loadExtensionParameters | ( | const ConfigurationParameterDescriptor * | node | ) | [protected, virtual] |
Configuration parameters loader of Extension.
Retrieves the key (by default it is B), then creates the event listener and the key listener for the defined key.
Reimplemented from OMK::Inp::GenericKeyExtension< OMK::Vis::OgreVis >.
Definition at line 55 of file OMKOverlayExtension.cpp.
References _overlayName, and OMK::ParametersAccessor::get().
00056 { 00057 bool ok = true ; 00058 ok = ParametersAccessor::get( node, "OverlayName", _overlayName ) ; 00059 return ok && GenericKeyExtension< OMK::Vis::OgreVis>::loadExtensionParameters(node) ; 00060 }
void OMK::Inp::OverlayExtension::preComputeParameters | ( | ) | [protected, virtual] |
Init Overlay.
Reimplemented from OMK::Extension.
Definition at line 31 of file OMKOverlayExtension.cpp.
References _init, _overlay, and _overlayName.
00032 { 00033 if (!_init){ 00034 _overlay = Ogre::OverlayManager::getSingleton().getByName(_overlayName); 00035 _init = true; 00036 _overlay->show(); 00037 } 00038 00039 }
Ogre::Overlay* OMK::Inp::OverlayExtension::_overlay [protected] |
Definition at line 57 of file OMKOverlayExtension.h.
Referenced by action(), and preComputeParameters().
bool OMK::Inp::OverlayExtension::_show [protected] |
bool OMK::Inp::OverlayExtension::_init [protected] |
std::string OMK::Inp::OverlayExtension::_overlayName [protected] |
Definition at line 60 of file OMKOverlayExtension.h.
Referenced by loadExtensionParameters(), and preComputeParameters().
Documentation generated on Mon Jun 9 11:46:04 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |