| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/sg/spacemouseevent.h>

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) | |
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.
| 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.
| 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 | ||||
| ) |