#include <GraphicsModule.h>
Public Member Functions | |
void | setPropertiesAfterLoginMenu (void) |
Set properties after the character role has been selected. | |
void | handleCrewInteraction (unsigned charID, string objName) |
Handle character crew interaction. | |
void | setPropertiesAfterConnectionMenu (void) |
Initialize the guis as the connection menu ends/the simulation begins. | |
void | addResource (int id, int amount) |
increase resource amount | |
void | renderRatingMenu () |
Render rate team menu. | |
void | startSimulation () |
Disable menu rendering and start simulation. | |
void | updateRatingMenu () |
Update rating menu for facilitator to see people sending their scores. | |
void | updateEvaluationMenu () |
Render the evaluation menu. | |
void | createFireFacilitator (Real x, Real y, Real z, Real scale) |
Create fire call from facilitator. | |
void | createPassengerFacilitator (Real x, Real y, Real z) |
Create passenger call facilitator. | |
void | setTotalScores (Real captainTScore, Real medicTScore, Real firemanTScore) |
Set total scores of team. | |
OgreRefApp::CollideCamera * | getCamera (void) const |
get camera object | |
Ogre::SceneManager * | getSceneManager (void) const |
get scene manager | |
OgreRefApp::World * | getWorld (void) const |
get physics world | |
Ogre::RaySceneQuery * | getRaySceneQuery (void) const |
get ray scene query object | |
bool | isRenderingMenu (void) const |
The information about the current screen is rendering menu. | |
bool | loginMenuLoop () |
The login menu loop of SpadeShip. | |
void | DisconnectClient (const unsigned charID) |
Remove the disconnected client information. | |
void | createClientEntity (unsigned char charID, Ogre::Real x, Ogre::Real y, Ogre::Real z, Ogre::Real dirX, Ogre::Real dirY, Ogre::Real dirZ) |
Initialize the client entity. | |
void | handleClientMovement (unsigned charID, Ogre::Real x, Ogre::Real y, Ogre::Real z, Ogre::Real dirX, Ogre::Real dirY, Ogre::Real dirZ) |
Handle the translation of client. | |
void | sendSelectedNPCtoFlagPoint () |
move npc to flagpoint | |
void | startNPCtoFollow (unsigned charID, string objName) |
set npc to follow an object | |
void | requestSelectedNPCtoFollow () |
broadcast follow request for npc | |
void | requestSelectedNPCtoStopFollow () |
broadcast stop follow request for npc | |
void | stopNPCtoFollow (unsigned charID, string objName) |
stop npc following an object | |
Public Attributes | |
int | sendObjectId |
Which resource to send? | |
Protected Member Functions | |
bool | configure (void) |
Configures the application - returns false if the user chooses to abandon configuration. | |
void | chooseSceneManager (void) |
Creates the BSP SceneManager. | |
void | createWorld (void) |
Creates the physics world. | |
void | createCamera (void) |
Creates camera object for characters and facilitator. | |
void | createViewports (void) |
Sets camera viewports. | |
void | setupResources (void) |
Method which will define the source of resources (other than current folder). | |
void | loadResources (void) |
Method which will load the resources. | |
bool | setupGUI (void) |
Setup CEGUI windows, menus. | |
void | createScene (void) |
Creates the default scene. | |
void | createSceneMaca (void) |
Creates maca scenario objects. | |
void | createPassenger (const Ogre::Vector3 &pos) |
Creates passenger npc with given position. | |
void | createMedicCrew (const Ogre::Vector3 &pos) |
Creates medic crew npc with given position. | |
void | createFiremanCrew (const Ogre::Vector3 &pos) |
Creates fireman crew npc with given position. | |
void | createFire (const Ogre::Vector3 &pos, const Ogre::Real scaleFactor, bool rotate=false) |
Create fire with given position, scale factor and orientation boolean. | |
Ogre::String | fetchNewNPCName (const Ogre::String &name) |
Increment npc agent count and return unique name. | |
void | createFrameListener (void) |
Create frame listener. | |
void | initComboBoxes (void) |
Initialize the combo boxes of CEGUI. | |
void | initDemoEventWiring (void) |
Set the button-event triggering of gui. | |
void | disableUnusedGUI (void) |
Hide unused gui menus. The necessary menu will be visible according to role. | |
bool | handleQuit (const CEGUI::EventArgs &e) |
Quit button handler. | |
bool | facilitatorAddPassenger (const CEGUI::EventArgs &e) |
Facilitator add passenger button handler. | |
bool | facilitatorSendResource (const CEGUI::EventArgs &e) |
Facilitator send resource button handler. | |
bool | facilitatorCreateFire (const CEGUI::EventArgs &e) |
Facilitator create fire button handler. | |
bool | handleRatingContinueBtn (const CEGUI::EventArgs &e) |
Rating menu continue button handler. | |
bool | handleInteractionButton (const CEGUI::EventArgs &e) |
Character interaction button handler. | |
bool | handleCaptainFollowInteractionButton (const CEGUI::EventArgs &e) |
Captain follow button handler. | |
bool | handleCaptainReleaseFollowInteractionButton (const CEGUI::EventArgs &e) |
Captain leave button handler. | |
bool | handleCaptainDirectInteractionButton (const CEGUI::EventArgs &e) |
Captain direct button handler. | |
bool | handleStartSimulation (const CEGUI::EventArgs &e) |
Start simulation button handler. | |
bool | handleStart (const CEGUI::EventArgs &e) |
Start button handler. | |
bool | handleServerOrClient (const CEGUI::EventArgs &e) |
Handle server or client selection. | |
bool | handleFacilitatorCamera (const CEGUI::EventArgs &e) |
Handle facilitator camera selection menu. | |
bool | handleSendResourceBtn (const CEGUI::EventArgs &e) |
Handle send resource button. | |
bool | handleIPText (const CEGUI::EventArgs &e) |
Handle ip text in login menu. | |
Protected Attributes | |
Ogre::Root * | mRoot |
rendering root | |
OgreRefApp::CollideCamera * | mCamera |
colliding camera object for characters. both renders and has a body for collisions and dynamics | |
Ogre::SceneManager * | mSceneMgr |
main scene manager | |
Ogre::RaySceneQuery * | mRaySceneQuery |
ray scene query object for 3D picking | |
OgreRefApp::World * | mWorld |
simulation physics world | |
GraphicsModule_FrameListener * | mFrameListener |
link to the frame listener | |
bool | loginMenuStart |
enabled if rendering login menu | |
bool | menuRendering |
enabled if rendering gui menus |
Rendering the objects, providing the clients FPS,third person view. The module is developed using OGRE library. The graphics module handles the object entities, cameras, scene management etc.
bool GraphicsModule::configure | ( | void | ) | [protected] |
Configures the application - returns false if the user chooses to abandon configuration.
The OGRE start window for rendering settings.
void GraphicsModule::chooseSceneManager | ( | void | ) | [protected] |
Creates the BSP SceneManager.
The sceneManager selection of OGRE.
The current selection is a BSPSceneManager and ST_INTERIOR.
void GraphicsModule::createWorld | ( | void | ) | [protected] |
Creates the physics world.
Create BSP-specific world.
void GraphicsModule::createCamera | ( | void | ) | [protected] |
Creates camera object for characters and facilitator.
Create the camera instance.
The camera is initially positioned in Z distance It is further modified to the clients position providing a FPS view.
void GraphicsModule::createViewports | ( | void | ) | [protected] |
Sets camera viewports.
Create the viewports of the rendering window.
void GraphicsModule::setupResources | ( | void | ) | [protected] |
Method which will define the source of resources (other than current folder).
Setup the graphics resources.
The method parses the "resources.cfg" file and makes them ready for loading.
void GraphicsModule::loadResources | ( | void | ) | [protected] |
Method which will load the resources.
Load the graphics resources setup by setupResources() method.
Initializes the resources in resources.cfg which are set by setupResources()
bool GraphicsModule::setupGUI | ( | void | ) | [protected] |
Setup CEGUI windows, menus.
Handles the GUI setup.
void GraphicsModule::createScene | ( | void | ) | [protected] |
Creates the default scene.
Create the scene to be rendered.
Initializes the light,skybox,ship,oceansurface to be rendered by OGRE.
void GraphicsModule::createSceneMaca | ( | void | ) | [protected] |
Creates maca scenario objects.
Create scenario objects as fire, passengers, crew etc.
void GraphicsModule::initComboBoxes | ( | void | ) | [protected] |
Initialize the combo boxes of CEGUI.
void GraphicsModule::setPropertiesAfterLoginMenu | ( | void | ) |
Set properties after the character role has been selected.
Enabled/Disable camera collision for character/facilitator Reset counter variables
void GraphicsModule::handleCrewInteraction | ( | unsigned | charID, | |
string | objName | |||
) |
Handle character crew interaction.
charID | Id of the interacting character | |
objName | Name of the npc in interaction. ( fire or passenger ) |
bool GraphicsModule::isRenderingMenu | ( | void | ) | const [inline] |
The information about the current screen is rendering menu.
bool GraphicsModule::loginMenuLoop | ( | ) |
The login menu loop of SpadeShip.
void GraphicsModule::DisconnectClient | ( | const unsigned | charID | ) |
Remove the disconnected client information.
charID | The ID of the disconneted client |
void GraphicsModule::createClientEntity | ( | unsigned char | charID, | |
Ogre::Real | x, | |||
Ogre::Real | y, | |||
Ogre::Real | z, | |||
Ogre::Real | dirX, | |||
Ogre::Real | dirY, | |||
Ogre::Real | dirZ | |||
) |
Initialize the client entity.
charID | The ID of the client | |
x | Position on x-axis. | |
y | Position on y-axis. | |
z | Position on z-axis. | |
dir_x | Direction on x-axis. | |
dir_y | Direction on y-axis. | |
dir_z | Direction on z-axis. |
void GraphicsModule::handleClientMovement | ( | unsigned | charID, | |
Ogre::Real | x, | |||
Ogre::Real | y, | |||
Ogre::Real | z, | |||
Ogre::Real | dirX, | |||
Ogre::Real | dirY, | |||
Ogre::Real | dirZ | |||
) |
Handle the translation of client.
charID | Id of the moving client | |
x | Tranlation in x-axis | |
y | Tranlation in y-axis | |
z | Tranlation in z-axis | |
dirX | Rotation in x-axis | |
dirY | Rotation in y-axis | |
dirZ | Rotation in z-axis |