- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# osgProducer::EventAdapter Class Reference

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

Inheritance diagram for osgProducer::EventAdapter:

[legend]
List of all members.

## Public Member Functions
| EventAdapter ()
virtual | ~EventAdapter ()
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 float | getXmin () const
| window minimum x.
virtual float | getXmax () const
| window maximum x.
virtual float | getYmin () const
| window minimum y.
virtual float | getYmax () const
| window maximum y.
virtual float | getX () const
| current mouse x position.
virtual float | getY () const
| current mouse y position.
virtual unsigned int | getButtonMask () const
| current mouse button state
virtual double | time () const
| time in seconds of event.
virtual unsigned int | getModKeyMask () const
| current modkey state
void | adaptResize (double t, float Xmin, float Ymin, float Xmax, float Ymax)
| method for adapting resize events.
void | adaptMouseScroll (double t, Producer::KeyboardMouseCallback::ScrollingMotion sm)
| method for adapting mouse scroll wheel events.
void | adaptMouseMotion (double t, float x, float y)
| method for adapting mouse motion events whilst mouse buttons are pressed.
void | adaptButtonPress (double t, float x, float y, unsigned int button)
void | adaptButtonRelease (double t, float x, float y, unsigned int button)
void | adaptKeyPress (double t, Producer::KeySymbol key)
| method for adapting keyboard events.
void | adaptKeyRelease (double t, Producer::KeySymbol key)
void | adaptFrame (double t)
| method for adapting frame events, i.e.
void | copyStaticVariables ()
## Static Public Member Functions
static void | setWindowSize (float Xmin, float Ymin, float Xmax, float Ymax)
| static method for setting window dimensions.
static void | setButtonMask (unsigned int buttonMask)
| static method for setting button state.
## Static Public Attributes
static unsigned int | _s_accumulatedButtonMask = 0
static int | _s_button = 0
static float | _s_Xmin = 0
static float | _s_Xmax = 1280
static float | _s_Ymin = 0
static float | _s_Ymax = 1024
static float | _s_mx = 0
static float | _s_my = 0
static int | _s_modKeyMask = 0
## Protected Attributes
EventType | _eventType
int | _key
int | _button
float | _Xmin
float | _Xmax
float | _Ymin
float | _Ymax
float | _mx
float | _my
unsigned int | _buttonMask
unsigned int | _modKeyMask
double | _time

## Detailed Description

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

## Constructor & Destructor Documentation

EventAdapter::EventAdapter | ( |  | ) |

virtual osgProducer::EventAdapter::~EventAdapter | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

void EventAdapter::adaptButtonPress | ( | double | t,
|  | float | x,
|  | float | y,
|  | unsigned int | button
| ) |

void EventAdapter::adaptButtonRelease | ( | double | t,
|  | float | x,
|  | float | y,
|  | unsigned int | button
| ) |

void EventAdapter::adaptFrame | ( | double | t | ) |

| method for adapting frame events, i.e. idle/display callback.

void EventAdapter::adaptKeyPress | ( | double | t,
|  | Producer::KeySymbol | key
| ) |

| method for adapting keyboard events.

void EventAdapter::adaptKeyRelease | ( | double | t,
|  | Producer::KeySymbol | key
| ) |

void EventAdapter::adaptMouseMotion | ( | double | t,
|  | float | x,
|  | float | y
| ) |

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

void EventAdapter::adaptMouseScroll | ( | double | t,
|  | Producer::KeyboardMouseCallback::ScrollingMotion | sm
| ) |

| method for adapting mouse scroll wheel events.

void EventAdapter::adaptResize | ( | double | t,
|  | float | Xmin,
|  | float | Ymin,
|  | float | Xmax,
|  | float | Ymax
| ) |

| method for adapting resize events.

void EventAdapter::copyStaticVariables | ( |  | ) |

virtual int osgProducer::EventAdapter::getButton | ( |  | ) | const`[inline, virtual]`

| button pressed/released, return -1 if inappropriate for this event. Implements osgGA::GUIEventAdapter.

virtual unsigned int osgProducer::EventAdapter::getButtonMask | ( |  | ) | const`[inline, virtual]`

| current mouse button state Implements osgGA::GUIEventAdapter.

virtual EventType osgProducer::EventAdapter::getEventType | ( |  | ) | const`[inline, virtual]`

| Get the EventType of the GUI event. Implements osgGA::GUIEventAdapter.

virtual int osgProducer::EventAdapter::getKey | ( |  | ) | const`[inline, virtual]`

| key pressed, return -1 if inappropriate for this event. Implements osgGA::GUIEventAdapter.

virtual unsigned int osgProducer::EventAdapter::getModKeyMask | ( |  | ) | const`[inline, virtual]`

| current modkey state Implements osgGA::GUIEventAdapter.

virtual float osgProducer::EventAdapter::getX | ( |  | ) | const`[inline, virtual]`

| current mouse x position. Implements osgGA::GUIEventAdapter.

virtual float osgProducer::EventAdapter::getXmax | ( |  | ) | const`[inline, virtual]`

| window maximum x. Implements osgGA::GUIEventAdapter.

virtual float osgProducer::EventAdapter::getXmin | ( |  | ) | const`[inline, virtual]`

| window minimum x. Implements osgGA::GUIEventAdapter.

virtual float osgProducer::EventAdapter::getY | ( |  | ) | const`[inline, virtual]`

| current mouse y position. Implements osgGA::GUIEventAdapter.

virtual float osgProducer::EventAdapter::getYmax | ( |  | ) | const`[inline, virtual]`

| window maximum y. Implements osgGA::GUIEventAdapter.

virtual float osgProducer::EventAdapter::getYmin | ( |  | ) | const`[inline, virtual]`

| window minimum y. Implements osgGA::GUIEventAdapter.

void EventAdapter::setButtonMask | ( | unsigned int | buttonMask | ) | `[static]`

| static method for setting button state.

void EventAdapter::setWindowSize | ( | float | Xmin,
|  | float | Ymin,
|  | float | Xmax,
|  | float | Ymax
| ) | `[static]`

| static method for setting window dimensions.

virtual double osgProducer::EventAdapter::time | ( |  | ) | const`[inline, virtual]`

| time in seconds of event. Implements osgGA::GUIEventAdapter.

## Member Data Documentation

int osgProducer::EventAdapter::_button`[protected]`

unsigned int osgProducer::EventAdapter::_buttonMask`[protected]`

EventType osgProducer::EventAdapter::_eventType`[protected]`

int osgProducer::EventAdapter::_key`[protected]`

unsigned int osgProducer::EventAdapter::_modKeyMask`[protected]`

float osgProducer::EventAdapter::_mx`[protected]`

float osgProducer::EventAdapter::_my`[protected]`

unsigned int EventAdapter::_s_accumulatedButtonMask = 0`[static]`

int EventAdapter::_s_button = 0`[static]`

int EventAdapter::_s_modKeyMask = 0`[static]`

float EventAdapter::_s_mx = 0`[static]`

float EventAdapter::_s_my = 0`[static]`

float EventAdapter::_s_Xmax = 1280`[static]`

float EventAdapter::_s_Xmin = 0`[static]`

float EventAdapter::_s_Ymax = 1024`[static]`

float EventAdapter::_s_Ymin = 0`[static]`

double osgProducer::EventAdapter::_time`[protected]`

float osgProducer::EventAdapter::_Xmax`[protected]`

float osgProducer::EventAdapter::_Xmin`[protected]`

float osgProducer::EventAdapter::_Ymax`[protected]`

float osgProducer::EventAdapter::_Ymin`[protected]`

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

- EventAdapter
- EventAdapter.cpp