#include <_scene.h>
Public Member Functions | |
_scene (const MODULE_ID &_id, const wxString &_name, EventHandler *msgSink) | |
Class constructor - do not alter. | |
virtual | ~_scene () |
Class destructor - deinitialize your data. | |
virtual wxString | GetDesc () const |
Always overload method giving description for your module. | |
Protected Member Functions | |
virtual void | processEvent (wxCommandEvent &evt) |
Overload this to process events you need. | |
virtual void | run () |
Overload only if you need to do some action every iteration of module's loop. | |
Protected Attributes | |
int | var |
Add any variables. | |
Parameter::ParameterIdentificator | varParamID |
Add var param identificator to register this as parameter. |
Definition at line 28 of file _scene.h.
VRUT::_scene::_scene | ( | const MODULE_ID & | _id, | |
const wxString & | _name, | |||
EventHandler * | msgSink | |||
) | [inline] |
Class constructor - do not alter.
Initialize your variables Do not change other than param name when initializing param identificators
Register your params - choose GUI type or just register w/o GUI
Definition at line 70 of file _scene.h.
00071 : SceneModule(_id, _name, 0, msgSink), 00074 varParamID(_name, wxT("var"), _id) 00075 { 00077 REGISTER_PARAM_GUI_SLIDER(varParamID, wxT("100"), 0, 200); 00078 }
virtual VRUT::_scene::~_scene | ( | ) | [inline, virtual] |
virtual void VRUT::_scene::processEvent | ( | wxCommandEvent & | evt | ) | [inline, protected, virtual] |
Overload this to process events you need.
Always call base method
Remember to process registered param update events
Reimplemented from VRUT::SceneModule.
Definition at line 37 of file _scene.h.
00038 { 00040 SceneModule::processEvent(evt); 00041 00042 switch (evt.GetEventType()) 00043 { 00045 case Event::EVT_PARAM_SET: 00046 UPDATE_PARAM_FROM_EVENT_INT(varParamID, var, evt); 00047 break; 00048 } 00049 }
virtual void VRUT::_scene::run | ( | ) | [inline, protected, virtual] |
Overload only if you need to do some action every iteration of module's loop.
These actions below usually take place as reaction to events and not in run()
method Use <className> in all your log messages Scene modules have its scene ID assigned
and access to scene manager
If using long time operations be sure to check for exit during them
If we are to exit return to main loop as soon as possible
Reimplemented from VRUT::Module.
Definition at line 51 of file _scene.h.
00052 { 00056 LOG(wxString::Format(wxT("<_scene>I am ready to play with scene ID %i"), sceneID)); 00058 if (!GetSceneMgr()->GetScene(sceneID)) 00059 LOG(wxT("<_scene>but it is not a valid scene :(")); 00060 else 00061 LOG(wxT("<_scene>and it is a valid scene :)")); 00063 if (TestExit()) 00065 return; 00066 }
virtual wxString VRUT::_scene::GetDesc | ( | ) | const [inline, virtual] |
Always overload method giving description for your module.
Implements VRUT::Module.
Definition at line 85 of file _scene.h.
int VRUT::_scene::var [protected] |