VRUT::CameraModule Class Reference

Module processing input events and applying them to camera - abstract. More...

#include <cameramodule.h>

Inheritance diagram for VRUT::CameraModule:

VRUT::ManipulatorModule VRUT::SceneModule VRUT::Module VRUT::CameraManipulator VRUT::Navigation

List of all members.

Public Member Functions

 CameraModule (const MODULE_ID &_id, const wxString &_name, unsigned _type, EventHandler *msgSink)
 Class constructor.
virtual ~CameraModule ()
 Class destructor.

Protected Member Functions

virtual void processEvent (wxCommandEvent &evt)
 Process general event - Module overload.
NODE_ID getCameraID () const
 Get associated camera ID.
SCENE_ID getSceneID () const
 Get camera's scene ID.

Protected Attributes

RENDER_WINDOW_ID windowID
 Render window ID to receive input events from.
Parameter::ParameterIdentificator windowIDParamID
 windowID parameter identificator


Detailed Description

Module processing input events and applying them to camera - abstract.

Definition at line 22 of file cameramodule.h.


Constructor & Destructor Documentation

VRUT::CameraModule::CameraModule ( const MODULE_ID _id,
const wxString &  _name,
unsigned  _type,
EventHandler msgSink 
) [inline]

Class constructor.

Definition at line 74 of file cameramodule.h.

00075                      : ManipulatorModule(_id, _name, (_type | MODULE_TYPE_CAMERA), msgSink)
00076               {
00077                      windowID = RENDER_WINDOW_ID_NONE;
00078                      REGISTER_PARAM_GUI_TEXTCONTROL(windowIDParamID, wxT("windowID"), wxString::Format(wxT("%i"), NODE_ID_NONE), wxT("ID of renderer window."));
00079                      REGISTER_LISTENER(Event::EVT_RENDER_WIN_CLOSED);
00080                      REGISTER_LISTENER(Event::EVT_RENDER_CACHE_STOP);
00081                      REGISTER_LISTENER(Event::EVT_IO_SCENE_IMPORT_DONE);
00082               }

virtual VRUT::CameraModule::~CameraModule (  )  [inline, virtual]

Class destructor.

Definition at line 84 of file cameramodule.h.

00084 {}


Member Function Documentation

virtual void VRUT::CameraModule::processEvent ( wxCommandEvent &  evt  )  [inline, protected, virtual]

Process general event - Module overload.

Release me

Reimplemented from VRUT::ManipulatorModule.

Reimplemented in VRUT::CameraManipulator, and VRUT::Navigation.

Definition at line 31 of file cameramodule.h.

00032               {
00033                      ManipulatorModule::processEvent(evt);
00034                      switch (evt.GetEventType())
00035                      {
00036                      case Event::EVT_PARAM_SET:
00037                             UPDATE_PARAM_FROM_EVENT_ID(windowIDParamID, windowID, evt);
00038                             break;
00039                      case Event::EVT_RENDER_WIN_CLOSED:
00040                             if (evt.GetId() == int(windowID))
00041                             {
00043                                    wxCommandEvent ev = Event::GET_EVT_MODULE_RELEASE(GetID());
00044                                    PostToKernel(ev);
00045                             }
00046                             break;
00047                      case Event::EVT_IO_SCENE_IMPORT_DONE:
00048                      case Event::EVT_RENDER_CACHE_STOP:
00049                             if (evt.GetId() == int(getSceneID()))
00050                             {
00051                                    wxCommandEvent ev = Event::GET_EVT_SCENE_CAM_FIT(getSceneID(), getCameraID());
00052                                    PostToKernel(ev);
00053                                    wxCommandEvent ev2 = Event::GET_EVT_RENDER_UPDATE(getSceneID());
00054                                    PostToKernel(ev2);
00055                             }
00056                             break;
00057                      default:
00058                             break;
00059                      }
00060               }

NODE_ID VRUT::CameraModule::getCameraID (  )  const [inline, protected]

Get associated camera ID.

Definition at line 62 of file cameramodule.h.

00063               {
00064                      return nodeID;
00065               }

SCENE_ID VRUT::CameraModule::getSceneID (  )  const [inline, protected]

Get camera's scene ID.

Definition at line 67 of file cameramodule.h.

00068               {
00069                      return sceneID;
00070               }


Member Data Documentation

Render window ID to receive input events from.

Definition at line 26 of file cameramodule.h.

windowID parameter identificator

Definition at line 28 of file cameramodule.h.


The documentation for this class was generated from the following file:

Generated on Tue Mar 10 14:41:41 2009 for VRUT by  doxygen 1.5.5