Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mitsuba::DeviceEvent Struct Reference

The device event structure encapsulates event information such as mouse movement or key presses. More...

#include <mitsuba/hw/device.h>

Public Member Functions

 DeviceEvent ()
 Default constructor. More...
 
 DeviceEvent (unsigned short type)
 Type constructor. More...
 
unsigned short getType () const
 Return the event type. More...
 
void setType (int type)
 Set the event type. More...
 
void setMousePosition (const Point2i &position)
 Get the mouse position vector. More...
 
Point2i getMousePosition () const
 Set the mouse position vector. More...
 
void setMouseRelative (const Vector2i &relative)
 Get the relative mouse movement vector. More...
 
Vector2i getMouseRelative () const
 Set the relative mouse movement vector. More...
 
void setMouseButton (unsigned short button)
 Set the enum of the pressed mouse button. More...
 
unsigned short getMouseButton () const
 Get the enum of the pressed mouse button. More...
 
void setKeyboardKey (char key)
 Set the pressed keyboard key (latin1) More...
 
char getKeyboardKey () const
 Get the pressed keyboard key (latin1) More...
 
void setKeyboardSpecial (unsigned short special)
 Set the pressed keyboard key special identifier enum (see Device::ESpecialKeys) More...
 
unsigned short getKeyboardSpecial () const
 Get the pressed keyboard key special identifier enum (see Device::ESpecialKeys) More...
 
void setKeyboardModifiers (unsigned short modifiers)
 Set the keyboard modifiers (see Device::EKeyboardModifiers) More...
 
unsigned short getKeyboardModifiers () const
 Get the keyboard modifiers (see Device::EKeyboardModifiers) More...
 
const char * getKeyboardInterpreted () const
 Get the interpreted keypress data. More...
 
char * getKeyboardInterpreted ()
 Get the interpreted keypress data. More...
 
void setActionSource (Object *source)
 Set the event source. More...
 
ObjectgetActionSource ()
 Get the event source. More...
 
std::string toString () const
 Return a string representation. More...
 

Detailed Description

The device event structure encapsulates event information such as mouse movement or key presses.

Constructor & Destructor Documentation

mitsuba::DeviceEvent::DeviceEvent ( )
inline

Default constructor.

mitsuba::DeviceEvent::DeviceEvent ( unsigned short  type)
inline

Type constructor.

Member Function Documentation

Object* mitsuba::DeviceEvent::getActionSource ( )
inline

Get the event source.

const char* mitsuba::DeviceEvent::getKeyboardInterpreted ( ) const
inline

Get the interpreted keypress data.

char* mitsuba::DeviceEvent::getKeyboardInterpreted ( )
inline

Get the interpreted keypress data.

char mitsuba::DeviceEvent::getKeyboardKey ( ) const
inline

Get the pressed keyboard key (latin1)

unsigned short mitsuba::DeviceEvent::getKeyboardModifiers ( ) const
inline

Get the keyboard modifiers (see Device::EKeyboardModifiers)

unsigned short mitsuba::DeviceEvent::getKeyboardSpecial ( ) const
inline

Get the pressed keyboard key special identifier enum (see Device::ESpecialKeys)

unsigned short mitsuba::DeviceEvent::getMouseButton ( ) const
inline

Get the enum of the pressed mouse button.

Point2i mitsuba::DeviceEvent::getMousePosition ( ) const
inline

Set the mouse position vector.

Vector2i mitsuba::DeviceEvent::getMouseRelative ( ) const
inline

Set the relative mouse movement vector.

unsigned short mitsuba::DeviceEvent::getType ( ) const
inline

Return the event type.

void mitsuba::DeviceEvent::setActionSource ( Object source)
inline

Set the event source.

void mitsuba::DeviceEvent::setKeyboardKey ( char  key)
inline

Set the pressed keyboard key (latin1)

void mitsuba::DeviceEvent::setKeyboardModifiers ( unsigned short  modifiers)
inline

Set the keyboard modifiers (see Device::EKeyboardModifiers)

void mitsuba::DeviceEvent::setKeyboardSpecial ( unsigned short  special)
inline

Set the pressed keyboard key special identifier enum (see Device::ESpecialKeys)

void mitsuba::DeviceEvent::setMouseButton ( unsigned short  button)
inline

Set the enum of the pressed mouse button.

void mitsuba::DeviceEvent::setMousePosition ( const Point2i position)
inline

Get the mouse position vector.

void mitsuba::DeviceEvent::setMouseRelative ( const Vector2i relative)
inline

Get the relative mouse movement vector.

void mitsuba::DeviceEvent::setType ( int  type)
inline

Set the event type.

std::string mitsuba::DeviceEvent::toString ( ) const

Return a string representation.

Member Data Documentation

unsigned short mitsuba::DeviceEvent::button
char mitsuba::DeviceEvent::interpreted[16]
char mitsuba::DeviceEvent::key
struct { ... } mitsuba::DeviceEvent::m_action
struct { ... } mitsuba::DeviceEvent::m_keyboard
struct { ... } mitsuba::DeviceEvent::m_mouse
unsigned short mitsuba::DeviceEvent::modifiers
Object* mitsuba::DeviceEvent::source
unsigned short mitsuba::DeviceEvent::special
int mitsuba::DeviceEvent::x
int mitsuba::DeviceEvent::xrel
int mitsuba::DeviceEvent::y
int mitsuba::DeviceEvent::yrel

The documentation for this struct was generated from the following file: