#include <PtdBuilderControlModule.h>
Public Member Functions | |
| CMouseControlBuilder () | |
| Default constructor. | |
| virtual void | process (fsf::CPassiveHandle *pPassiveHandle, fsf::CActiveHandle *pActiveHandle, fsf::CActivePulse *pActivePulse) |
| virtual void | getTypeID (std::string &str) const |
| Gets this cell's factory mapping key. | |
Static Public Attributes | |
| static const long | GAME_STATE = 0 |
| static const long | RENDERING_PARAMS = 1 |
| static const long | CAMERA = 2 |
| static const long | MOUSE_X = 3 |
| static const long | MOUSE_Y = 4 |
| static const long | MOUSE_STATE = 5 |
Private Member Functions | |
Process Functions | |
| void | processMainWindow (CGameState *pGameState, ogl::CCamera *pCamera, fsf::Int32Node *pX, fsf::Int32Node *pY, fsf::Int32Node *pState, CBuilderRenderParameters *pParameters, glutio::CMouseEvent *pME) |
| Process Main Window. | |
| void | processMiniMap (CGameState *pGameState, ogl::CCamera *pCamera, fsf::Int32Node *pX, fsf::Int32Node *pY, fsf::Int32Node *pState, CBuilderRenderParameters *pParameters, glutio::CMouseEvent *pME) |
| Process Mini Map. | |
| void | processToolBar (CGameState *pGameState, ogl::CCamera *pCamera, fsf::Int32Node *pX, fsf::Int32Node *pY, fsf::Int32Node *pState, CBuilderRenderParameters *pParameters, glutio::CMouseEvent *pME) |
| Process Tool Bar. | |
Helper Functions | |
| double | getWorldX (double screenX, CBuilderRenderParameters *pParameters, ogl::CCamera *pCamera) |
| Translate screen x coordinate into world coordinate. | |
| double | getWorldY (double screenY, CBuilderRenderParameters *pParameters, ogl::CCamera *pCamera) |
| Translate screen y coordinate into world coordinate. | |
| CMouseControlBuilder::CMouseControlBuilder | ( | ) |
Default constructor.
Default mouse control constructor that sets up the passive and active filters in the MFSM framework
| double CMouseControlBuilder::getWorldX | ( | double | screenX, | |
| CBuilderRenderParameters * | pParameters, | |||
| ogl::CCamera * | pCamera | |||
| ) | [private] |
Translate screen x coordinate into world coordinate.
Returns the horizontal location of the mouse in the world (level)
| double CMouseControlBuilder::getWorldY | ( | double | screenY, | |
| CBuilderRenderParameters * | pParameters, | |||
| ogl::CCamera * | pCamera | |||
| ) | [private] |
Translate screen y coordinate into world coordinate.
Returns the vertical location of the mouse in the world (level)
| void CMouseControlBuilder::process | ( | fsf::CPassiveHandle * | pPassiveHandle, | |
| fsf::CActiveHandle * | pActiveHandle, | |||
| fsf::CActivePulse * | pActivePulse | |||
| ) | [virtual] |
Handles mouse input from the builder Specifically, it determines if the mouse was clicked/released and where the mouse was pointing.
| void CMouseControlBuilder::processMainWindow | ( | CGameState * | pGameState, | |
| ogl::CCamera * | pCamera, | |||
| fsf::Int32Node * | pX, | |||
| fsf::Int32Node * | pY, | |||
| fsf::Int32Node * | pState, | |||
| CBuilderRenderParameters * | pParameters, | |||
| glutio::CMouseEvent * | pME | |||
| ) | [private] |
Process Main Window.
Handles mouse input from the builder when the mouse is in the main window
| void CMouseControlBuilder::processMiniMap | ( | CGameState * | pGameState, | |
| ogl::CCamera * | pCamera, | |||
| fsf::Int32Node * | pX, | |||
| fsf::Int32Node * | pY, | |||
| fsf::Int32Node * | pState, | |||
| CBuilderRenderParameters * | pParameters, | |||
| glutio::CMouseEvent * | pME | |||
| ) | [private] |
Process Mini Map.
Handles mouse input from the builder when the mouse is in the mini map
| void CMouseControlBuilder::processToolBar | ( | CGameState * | pGameState, | |
| ogl::CCamera * | pCamera, | |||
| fsf::Int32Node * | pX, | |||
| fsf::Int32Node * | pY, | |||
| fsf::Int32Node * | pState, | |||
| CBuilderRenderParameters * | pParameters, | |||
| glutio::CMouseEvent * | pME | |||
| ) | [private] |
Process Tool Bar.
Handles mouse input from the builder when the mouse is in the tool bar
1.5.9