version 3.3

VRS::SpaceMouseEvent Class Reference

#include <vrs/sg/spacemouseevent.h>

Inheritance diagram for VRS::SpaceMouseEvent:

VRS::Event VRS::SharedObj VRS::Visitable

List of all members.

Public Types

enum  Type { ZeroEvent, MotionEvent, ButtonEvent }
enum  Axis { X, Y, Z }

Public Member Functions

 SpaceMouseEvent ()
 Creates a SpaceMouseEvent of type ZeroEvent.
 SpaceMouseEvent (long translationX, long translationY, long translationZ, long rotationX, long rotationY, long rotationZ)
 Creates a SpaceMouseEvent of type MotionEvent.
 SpaceMouseEvent (unsigned long pressed, unsigned long released)
Type getType () const
 VRS_SERIALIZABLE_CLASS_ENUM (Type)
 Returns the event type.
 VRS_SERIALIZABLE_CLASS_ENUM (Axis)
long getTranslation (Axis axis) const
long getRotation (Axis axis) const
bool buttonPressed (unsigned int button) const
bool buttonReleased (unsigned int button) const
 VRS_TYPEINFO (SpaceMouseEvent, Event)


Detailed Description

Class for events generated by a SpaceMouse.

Note: Space mouse events are not automatically generated. A SpaceMouseDevice must be initialized and registered first. This device is platform and GUI-toolkit dependent and is currently available only for Windows and with QT.


Member Enumeration Documentation

Enumerator:
ZeroEvent 
MotionEvent 
ButtonEvent 

Enumerator:
X 
Y 
Z 


Constructor & Destructor Documentation

VRS::SpaceMouseEvent::SpaceMouseEvent (  ) 

Creates a SpaceMouseEvent of type ZeroEvent.

VRS::SpaceMouseEvent::SpaceMouseEvent ( long  translationX,
long  translationY,
long  translationZ,
long  rotationX,
long  rotationY,
long  rotationZ 
)

Creates a SpaceMouseEvent of type MotionEvent.

VRS::SpaceMouseEvent::SpaceMouseEvent ( unsigned long  pressed,
unsigned long  released 
)

Creates a SpaceMouseEvent of type ButtonEvent. Which buzttons are pressed or released is bit-encoded into long values. If a button is pressed/released its bitfield contains a 1; if not, its bitfield contains a 0. The first button on the device is the 0x1 bit, the second button is the 0x2 bit, etc.


Member Function Documentation

Type VRS::SpaceMouseEvent::getType (  )  const

VRS::SpaceMouseEvent::VRS_SERIALIZABLE_CLASS_ENUM ( Type   ) 

Returns the event type.

VRS::SpaceMouseEvent::VRS_SERIALIZABLE_CLASS_ENUM ( Axis   ) 

long VRS::SpaceMouseEvent::getTranslation ( Axis  axis  )  const

long VRS::SpaceMouseEvent::getRotation ( Axis  axis  )  const

bool VRS::SpaceMouseEvent::buttonPressed ( unsigned int  button  )  const

These methods return the translation and rotation data produced by the device, i.e. translation along and rotation about the specified axis. Note: These methods may only be called for motion events.

bool VRS::SpaceMouseEvent::buttonReleased ( unsigned int  button  )  const

These methods return whicht button has been pressed or released respectively. Note: These methods may only be called for button events.

VRS::SpaceMouseEvent::VRS_TYPEINFO ( SpaceMouseEvent  ,
Event   
)


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

Generated on Tue May 22 06:00:30 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact