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

osgGLUT::GLUTEventAdapter Class Reference

Class for adapting GLUT events so that they can be used as input to osgGA::CameraManipulators. More...

Inheritance diagram for osgGLUT::GLUTEventAdapter:

Inheritance graph
[legend]
List of all members.

Public Methods

 GLUTEventAdapter ()
virtual ~GLUTEventAdapter ()
virtual EventType getEventType () const
 Get the EventType of the GUI event.

virtual int getKey () const
 key pressed, return -1 if inappropriate for this event.

virtual int getButton () const
 button pressed/released, return -1 if inappropriate for this event.

virtual int getXmin () const
 window minimum x.

virtual int getXmax () const
 window maximum x.

virtual int getYmin () const
 window minimum y.

virtual int getYmax () const
 window maximum y.

virtual int getX () const
 current mouse x position.

virtual int getY () const
 current mouse y position.

virtual unsigned int getButtonMask () const
 current mouse button state

virtual double time () const
 time in seconds of event.

void adaptResize (double t, int Xmin, int Ymin, int Xmax, int Ymax)
 method for adapting resize events.

void adaptMouseMotion (double t, int x, int y)
 method for adapting mouse motion events whilst mouse buttons are pressed.

void adaptMousePassiveMotion (double t, int x, int y)
 method for adapting mouse motion events whilst no mouse button are pressed.

void adaptMouse (double t, int button, int state, int x, int y)
 method for adapting mouse button pressed/released events.

void adaptKeyboard (double t, unsigned char key, int x, int y)
 method for adapting keyboard events.

void adaptFrame (double t)
 method for adapting frame events, i.e.

void copyStaticVariables ()

Static Public Methods

void setWindowSize (int Xmin, int Ymin, int Xmax, int Ymax)
 static method for setting window dimensions.

void setButtonMask (unsigned int buttonMask)
 static method for setting button state.


Protected Attributes

EventType _eventType
int _key
int _button
int _Xmin
int _Xmax
int _Ymin
int _Ymax
int _mx
int _my
unsigned int _buttonMask
double _time

Static Protected Attributes

unsigned int _s_accumulatedButtonMask
int _s_button
int _s_Xmin
int _s_Xmax
int _s_Ymin
int _s_Ymax
int _s_mx
int _s_my

Detailed Description

Class for adapting GLUT events so that they can be used as input to osgGA::CameraManipulators.


Constructor & Destructor Documentation

osgGLUT::GLUTEventAdapter::GLUTEventAdapter  
 

virtual osgGLUT::GLUTEventAdapter::~GLUTEventAdapter   [inline, virtual]
 


Member Function Documentation

void osgGLUT::GLUTEventAdapter::adaptFrame double    t
 

method for adapting frame events, i.e.

idle/display callback.

void osgGLUT::GLUTEventAdapter::adaptKeyboard double    t,
unsigned char    key,
int    x,
int    y
 

method for adapting keyboard events.

void osgGLUT::GLUTEventAdapter::adaptMouse double    t,
int    button,
int    state,
int    x,
int    y
 

method for adapting mouse button pressed/released events.

void osgGLUT::GLUTEventAdapter::adaptMouseMotion double    t,
int    x,
int    y
 

method for adapting mouse motion events whilst mouse buttons are pressed.

void osgGLUT::GLUTEventAdapter::adaptMousePassiveMotion double    t,
int    x,
int    y
 

method for adapting mouse motion events whilst no mouse button are pressed.

void osgGLUT::GLUTEventAdapter::adaptResize double    t,
int    Xmin,
int    Ymin,
int    Xmax,
int    Ymax
 

method for adapting resize events.

void osgGLUT::GLUTEventAdapter::copyStaticVariables  
 

virtual int osgGLUT::GLUTEventAdapter::getButton   const [inline, virtual]
 

button pressed/released, return -1 if inappropriate for this event.

Implements osgGA::GUIEventAdapter.

virtual unsigned int osgGLUT::GLUTEventAdapter::getButtonMask   const [inline, virtual]
 

current mouse button state

Implements osgGA::GUIEventAdapter.

virtual EventType osgGLUT::GLUTEventAdapter::getEventType   const [inline, virtual]
 

Get the EventType of the GUI event.

Implements osgGA::GUIEventAdapter.

virtual int osgGLUT::GLUTEventAdapter::getKey   const [inline, virtual]
 

key pressed, return -1 if inappropriate for this event.

Implements osgGA::GUIEventAdapter.

virtual int osgGLUT::GLUTEventAdapter::getX   const [inline, virtual]
 

current mouse x position.

Implements osgGA::GUIEventAdapter.

virtual int osgGLUT::GLUTEventAdapter::getXmax   const [inline, virtual]
 

window maximum x.

Implements osgGA::GUIEventAdapter.

virtual int osgGLUT::GLUTEventAdapter::getXmin   const [inline, virtual]
 

window minimum x.

Implements osgGA::GUIEventAdapter.

virtual int osgGLUT::GLUTEventAdapter::getY   const [inline, virtual]
 

current mouse y position.

Implements osgGA::GUIEventAdapter.

virtual int osgGLUT::GLUTEventAdapter::getYmax   const [inline, virtual]
 

window maximum y.

Implements osgGA::GUIEventAdapter.

virtual int osgGLUT::GLUTEventAdapter::getYmin   const [inline, virtual]
 

window minimum y.

Implements osgGA::GUIEventAdapter.

void osgGLUT::GLUTEventAdapter::setButtonMask unsigned int    buttonMask [static]
 

static method for setting button state.

void osgGLUT::GLUTEventAdapter::setWindowSize int    Xmin,
int    Ymin,
int    Xmax,
int    Ymax
[static]
 

static method for setting window dimensions.

virtual double osgGLUT::GLUTEventAdapter::time   const [inline, virtual]
 

time in seconds of event.

Implements osgGA::GUIEventAdapter.


Member Data Documentation

int osgGLUT::GLUTEventAdapter::_button [protected]
 

unsigned int osgGLUT::GLUTEventAdapter::_buttonMask [protected]
 

EventType osgGLUT::GLUTEventAdapter::_eventType [protected]
 

int osgGLUT::GLUTEventAdapter::_key [protected]
 

int osgGLUT::GLUTEventAdapter::_mx [protected]
 

int osgGLUT::GLUTEventAdapter::_my [protected]
 

unsigned int osgGLUT::GLUTEventAdapter::_s_accumulatedButtonMask [static, protected]
 

int osgGLUT::GLUTEventAdapter::_s_button [static, protected]
 

int osgGLUT::GLUTEventAdapter::_s_mx [static, protected]
 

int osgGLUT::GLUTEventAdapter::_s_my [static, protected]
 

int osgGLUT::GLUTEventAdapter::_s_Xmax [static, protected]
 

int osgGLUT::GLUTEventAdapter::_s_Xmin [static, protected]
 

int osgGLUT::GLUTEventAdapter::_s_Ymax [static, protected]
 

int osgGLUT::GLUTEventAdapter::_s_Ymin [static, protected]
 

double osgGLUT::GLUTEventAdapter::_time [protected]
 

int osgGLUT::GLUTEventAdapter::_Xmax [protected]
 

int osgGLUT::GLUTEventAdapter::_Xmin [protected]
 

int osgGLUT::GLUTEventAdapter::_Ymax [protected]
 

int osgGLUT::GLUTEventAdapter::_Ymin [protected]
 


The documentation for this class was generated from the following file:
Generated at Wed Sep 18 13:55:50 2002 for the Open Scene Graph by doxygen 1.2.16.