Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Teddy::SpaceGame::EventManager Class Reference

EventManager. More...

#include <EventManager.h>

Collaboration diagram for Teddy::SpaceGame::EventManager:

Collaboration graph
[legend]
List of all members.

Public Methods

 EventManager (Root *root)
void applyControls ()
void chooseMouseMode ()
void mouseMotion (const int b, const int x_delta, const int y_delta)
 mouse motion. More...

void cameraRotate (const int x, const int y)
 translate camera. More...

void cameraTranslate (const int x, const int y)
 rotate camera. More...


Protected Attributes

Rootroot
float control_roll
float control_heading
float control_pitch
bool control_speed_more
bool control_speed_less
float control_speed
int control_last_button
int mouse_mode
 Currently active mouse control mode. More...


Detailed Description

EventManager.

Todo:
docs

Definition at line 40 of file EventManager.h.


Constructor & Destructor Documentation

Teddy::SpaceGame::EventManager::EventManager Root   root
 

Definition at line 47 of file EventManager.cpp.

References control_heading, control_last_button, control_pitch, control_roll, control_speed, control_speed_less, control_speed_more, MM_CONTROL_CAMERA, mouse_mode, and root.

Referenced by mouseMotion().


Member Function Documentation

void Teddy::SpaceGame::EventManager::applyControls  
 

Definition at line 139 of file EventManager.cpp.

References control_heading, control_pitch, control_roll, control_speed, and root.

void Teddy::SpaceGame::EventManager::cameraRotate const int    x_delta,
const int    y_delta
 

translate camera.

Definition at line 63 of file EventManager.cpp.

References control_heading, and control_pitch.

void Teddy::SpaceGame::EventManager::cameraTranslate const int    x_delta,
const int    y_delta
 

rotate camera.

Definition at line 70 of file EventManager.cpp.

References control_roll, and control_speed.

void Teddy::SpaceGame::EventManager::chooseMouseMode  
 

Definition at line 77 of file EventManager.cpp.

References MM_CONTROL_CAMERA, MM_ROTATE_SCALE_INSTANCE, MM_TRANSLATE_INSTANCE, and mouse_mode.

void Teddy::SpaceGame::EventManager::mouseMotion const int    b,
const int    x_delta,
const int    y_delta
 

mouse motion.

Definition at line 102 of file EventManager.cpp.

References EventManager(), MM_CONTROL_CAMERA, MM_ROTATE_SCALE_INSTANCE, MM_TRANSLATE_INSTANCE, and root.


Member Data Documentation

float Teddy::SpaceGame::EventManager::control_heading [protected]
 

Definition at line 55 of file EventManager.h.

Referenced by applyControls(), cameraRotate(), and EventManager().

int Teddy::SpaceGame::EventManager::control_last_button [protected]
 

Definition at line 60 of file EventManager.h.

Referenced by EventManager().

float Teddy::SpaceGame::EventManager::control_pitch [protected]
 

Definition at line 56 of file EventManager.h.

Referenced by applyControls(), cameraRotate(), and EventManager().

float Teddy::SpaceGame::EventManager::control_roll [protected]
 

Definition at line 54 of file EventManager.h.

Referenced by applyControls(), cameraTranslate(), and EventManager().

float Teddy::SpaceGame::EventManager::control_speed [protected]
 

Definition at line 59 of file EventManager.h.

Referenced by applyControls(), cameraTranslate(), and EventManager().

bool Teddy::SpaceGame::EventManager::control_speed_less [protected]
 

Definition at line 58 of file EventManager.h.

Referenced by EventManager().

bool Teddy::SpaceGame::EventManager::control_speed_more [protected]
 

Definition at line 57 of file EventManager.h.

Referenced by EventManager().

int Teddy::SpaceGame::EventManager::mouse_mode [protected]
 

Currently active mouse control mode.

Definition at line 62 of file EventManager.h.

Referenced by chooseMouseMode(), and EventManager().

Root* Teddy::SpaceGame::EventManager::root [protected]
 

Definition at line 51 of file EventManager.h.

Referenced by applyControls(), EventManager(), and mouseMotion().


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