VRUT::ManipulatorManager Class Reference

Server managing all kinds of manipulator modules. More...

#include <manipmanager.h>

Inheritance diagram for VRUT::ManipulatorManager:

VRUT::ServerBase< T >

List of all members.

Public Member Functions

 ManipulatorManager ()
 Class constructor.
virtual ~ManipulatorManager ()
 Class destructor.
MODULE_ID ManipulateCamera (SCENE_ID sceneID, NODE_ID cameraID, RENDER_WINDOW_ID windowID)


Detailed Description

Server managing all kinds of manipulator modules.

Definition at line 26 of file manipmanager.h.


Constructor & Destructor Documentation

ManipulatorManager::ManipulatorManager (  ) 

Class constructor.

Definition at line 17 of file manipmanager.cpp.

ManipulatorManager::~ManipulatorManager (  )  [virtual]

Class destructor.

Definition at line 22 of file manipmanager.cpp.

00023 {
00024 }


Member Function Documentation

MODULE_ID ManipulatorManager::ManipulateCamera ( SCENE_ID  sceneID,
NODE_ID  cameraID,
RENDER_WINDOW_ID  windowID 
)

Pass camera to manipulator

Parameters:
[in] sceneID Scene with camera node
[in] cameraID Camera node ID to manipulate
[in] windowID Render window displaying camera's view
Returns:
ID of module used or MODULE_ID_NONE if failed

Create input handler module instance

Emulate param set so module has valid IDs ASAP

Emulate param set so module has valid IDs ASAP

Emulate param set so module has valid IDs ASAP

Definition at line 27 of file manipmanager.cpp.

00028 {
00030        MODULE_ID moduleID = createModuleInstance();
00031        ManipulatorModule * module = getModule(moduleID);
00032        if (!module)
00033               return MODULE_ID_NONE;
00034        module->SetSceneMgr(KERNEL->sceneManager);
00035        ModuleHandle<ManipulatorModule>::StartModuleThread(module);
00036 
00037        if (module && module->IsOfType(MODULE_TYPE_CAMERA))
00038        {
00039               Parameter::ParameterIdentificator pi = Parameter::ParameterIdentificator(module->GetName(), wxT("sceneID"), module->GetID());
00040               wxCommandEvent ev1 = Event::GET_EVT_PARAM_SET_DO(pi, ID_TO_STRING(sceneID));
00041               KERNEL->GetMessageSink()->PostEvent(ev1);
00043               wxCommandEvent evx1 = Event::GET_EVT_PARAM_SET(pi, ID_TO_STRING(sceneID));
00044               module->PostEvent(evx1, true);
00045 
00046               pi.paramName = wxT("nodeID");
00047               wxCommandEvent ev2 = Event::GET_EVT_PARAM_SET_DO(pi, ID_TO_STRING(cameraID));
00048               KERNEL->GetMessageSink()->PostEvent(ev2);
00050               wxCommandEvent evx2 = Event::GET_EVT_PARAM_SET(pi, ID_TO_STRING(cameraID));
00051               module->PostEvent(evx2, true);
00052 
00053               pi.paramName = wxT("windowID");
00054               wxCommandEvent ev3 = Event::GET_EVT_PARAM_SET_DO(pi, ID_TO_STRING(windowID));
00055               KERNEL->GetMessageSink()->PostEvent(ev3);
00057               wxCommandEvent evx3 = Event::GET_EVT_PARAM_SET(pi, ID_TO_STRING(windowID));
00058               module->PostEvent(evx3, true);
00059 
00060               return moduleID;
00061        }
00062        else
00063        {
00064               releaseModule(moduleID);
00065               return MODULE_ID_NONE;
00066        }
00067 }


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

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