Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Keyboard Class Reference

#include <Keyboard.h>

Inheritance diagram for Keyboard:
MotionController

List of all members.

Public Member Functions

 Keyboard ()
virtual ~Keyboard ()
virtual void MapKeys (KeyMapEntry *mapping, int nkeys)
virtual void Acquire ()
virtual double X ()
virtual double Y ()
virtual double Z ()
virtual double Pitch ()
virtual double Roll ()
virtual double Yaw ()
virtual int Center ()
virtual double Throttle ()
virtual void SetThrottle (double throttle)
virtual int Action (int n)
virtual int ActionMap (int n)
- Public Member Functions inherited from MotionController
 MotionController ()
virtual ~MotionController ()
StatusValue Status () const
int Sensitivity () const
int DeadZone () const
int Swapped () const
int Inverted () const
int RudderEnabled () const
int ThrottleEnabled () const
int Selector () const
virtual void SetSensitivity (int sense, int dead)
virtual void SetSelector (int sel)
virtual void SetRudderEnabled (int rud)
virtual void SetThrottleEnabled (int t)
virtual void SwapYawRoll (int swap)
virtual int GetSwapYawRoll ()
virtual void InvertPitch (int inv)
virtual int GetInverted ()

Static Public Member Functions

static const char * TYPENAME ()
static bool KeyDown (int key)
static bool KeyDownMap (int key)
static void FlushKeys ()
static KeyboardGetInstance ()

Protected Attributes

double x
double y
double z
double p
double r
double w
double t
double p1
double r1
double w1
int c
int action [MotionController::MaxActions]
- Protected Attributes inherited from MotionController
StatusValue status
int sensitivity
int dead_zone
int swapped
int inverted
int rudder
int throttle
int select

Static Protected Attributes

static int map [KEY_MAP_SIZE]
static int alt [KEY_MAP_SIZE]

Additional Inherited Members

- Public Types inherited from MotionController
enum  StatusValue { StatusOK, StatusErr, StatusBadParm }
enum  ActionValue { MaxActions = 32 }

Detailed Description

Definition at line 22 of file Keyboard.h.


Constructor & Destructor Documentation

Keyboard::Keyboard ( )

Definition at line 25 of file Keyboard.cpp.

Keyboard::~Keyboard ( )
virtual

Definition at line 52 of file Keyboard.cpp.


Member Function Documentation

void Keyboard::Acquire ( )
virtual

Reimplemented from MotionController.

Definition at line 128 of file Keyboard.cpp.

virtual int Keyboard::Action ( int  n)
inlinevirtual

Reimplemented from MotionController.

Definition at line 52 of file Keyboard.h.

virtual int Keyboard::ActionMap ( int  n)
inlinevirtual

Reimplemented from MotionController.

Definition at line 53 of file Keyboard.h.

virtual int Keyboard::Center ( )
inlinevirtual

Reimplemented from MotionController.

Definition at line 45 of file Keyboard.h.

void Keyboard::FlushKeys ( )
static

Definition at line 117 of file Keyboard.cpp.

Keyboard * Keyboard::GetInstance ( )
static

Definition at line 58 of file Keyboard.cpp.

bool Keyboard::KeyDown ( int  key)
static

Definition at line 82 of file Keyboard.cpp.

bool Keyboard::KeyDownMap ( int  key)
static

Definition at line 94 of file Keyboard.cpp.

void Keyboard::MapKeys ( KeyMapEntry mapping,
int  nkeys 
)
virtual

Reimplemented from MotionController.

Definition at line 66 of file Keyboard.cpp.

virtual double Keyboard::Pitch ( )
inlinevirtual

Reimplemented from MotionController.

Definition at line 42 of file Keyboard.h.

virtual double Keyboard::Roll ( )
inlinevirtual

Reimplemented from MotionController.

Definition at line 43 of file Keyboard.h.

virtual void Keyboard::SetThrottle ( double  throttle)
inlinevirtual

Reimplemented from MotionController.

Definition at line 49 of file Keyboard.h.

virtual double Keyboard::Throttle ( )
inlinevirtual

Reimplemented from MotionController.

Definition at line 48 of file Keyboard.h.

static const char* Keyboard::TYPENAME ( )
inlinestatic

Reimplemented from MotionController.

Definition at line 25 of file Keyboard.h.

virtual double Keyboard::X ( )
inlinevirtual

Reimplemented from MotionController.

Definition at line 37 of file Keyboard.h.

virtual double Keyboard::Y ( )
inlinevirtual

Reimplemented from MotionController.

Definition at line 38 of file Keyboard.h.

virtual double Keyboard::Yaw ( )
inlinevirtual

Reimplemented from MotionController.

Definition at line 44 of file Keyboard.h.

virtual double Keyboard::Z ( )
inlinevirtual

Reimplemented from MotionController.

Definition at line 39 of file Keyboard.h.


Member Data Documentation

int Keyboard::action[MotionController::MaxActions]
protected

Definition at line 65 of file Keyboard.h.

int Keyboard::alt
staticprotected

Definition at line 68 of file Keyboard.h.

int Keyboard::c
protected

Definition at line 64 of file Keyboard.h.

int Keyboard::map
staticprotected

Definition at line 67 of file Keyboard.h.

double Keyboard::p
protected

Definition at line 62 of file Keyboard.h.

double Keyboard::p1
protected

Definition at line 63 of file Keyboard.h.

double Keyboard::r
protected

Definition at line 62 of file Keyboard.h.

double Keyboard::r1
protected

Definition at line 63 of file Keyboard.h.

double Keyboard::t
protected

Definition at line 62 of file Keyboard.h.

double Keyboard::w
protected

Definition at line 62 of file Keyboard.h.

double Keyboard::w1
protected

Definition at line 63 of file Keyboard.h.

double Keyboard::x
protected

Definition at line 62 of file Keyboard.h.

double Keyboard::y
protected

Definition at line 62 of file Keyboard.h.

double Keyboard::z
protected

Definition at line 62 of file Keyboard.h.


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