00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00015
00016 #ifndef __SCENE_H__
00017 #define __SCENE_H__
00018
00019 #include "../../core/src/scenemodule.h"
00020
00021
00022 namespace VRUT
00023 {
00025 const int MODULE_VERSION = 1;
00026
00028 class _scene: public SceneModule
00029 {
00030 protected:
00032 int var;
00034 Parameter::ParameterIdentificator varParamID;
00035
00037 virtual void processEvent(wxCommandEvent & evt)
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 }
00051 virtual void run()
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 }
00067
00068 public:
00070 _scene(const MODULE_ID & _id, const wxString & _name, EventHandler * msgSink)
00071 : SceneModule(_id, _name, 0, msgSink),
00074 varParamID(_name, wxT("var"), _id)
00075 {
00077 REGISTER_PARAM_GUI_SLIDER(varParamID, wxT("100"), 0, 200);
00078 }
00080 virtual ~_scene()
00081 {
00082 }
00083
00085 virtual wxString GetDesc() const
00086 {
00087 return wxT("This is my module");
00088 }
00089 };
00090 };
00091
00092
00093 EXPORT_VRUT_MODULE_FUNCTIONS( _scene )
00094
00095
00096 #endif