Wrapper over Space Mouse data chunk within WM_INPUT event (known also as Raw Input in WinAPI). This class predefines specific list of supported devices, which does not depend on 3rdparty library provided by mouse vendor. Supported input chunks:
More...
#include <WNT_HIDSpaceMouse.hxx>
Wrapper over Space Mouse data chunk within WM_INPUT event (known also as Raw Input in WinAPI). This class predefines specific list of supported devices, which does not depend on 3rdparty library provided by mouse vendor. Supported input chunks:
- Rotation (3 directions);
- Translation (3 directions);
- Pressed buttons.
To use the class, register Raw Input device:
#define Handle(Class)
Define Handle() macro.
Definition Standard_Handle.hxx:399
Definition NCollection_UBTree.hxx:64
Then handle WM_INPUT events within window message loop.
{
{
break;
}
{
break;
}
{
break;
}
{
}
break;
}
@ Aspect_VKey_NavSlideRight
sidewalk, right
Definition Aspect_VKey.hxx:168
@ Aspect_VKey_NavSlideDown
fall down
Definition Aspect_VKey.hxx:170
@ Aspect_VKey_NavForward
go forward
Definition Aspect_VKey.hxx:165
@ Aspect_VKey_NavBackward
go backward
Definition Aspect_VKey.hxx:166
@ Aspect_VKey_NavSlideUp
lift up
Definition Aspect_VKey.hxx:169
@ Aspect_VKey_NavSlideLeft
sidewalk, left
Definition Aspect_VKey.hxx:167
Auxiliary structure for handling viewer events between GUI and Rendering threads.
Definition AIS_ViewController.hxx:54
Structure defining key state.
Definition Aspect_VKeySet.hxx:26
Wrapper over Space Mouse data chunk within WM_INPUT event (known also as Raw Input in WinAPI)....
Definition WNT_HIDSpaceMouse.hxx:84
@ VENDOR_ID_3DCONNEXION
Definition WNT_HIDSpaceMouse.hxx:87
@ VENDOR_ID_LOGITECH
Definition WNT_HIDSpaceMouse.hxx:87
◆ anonymous enum
Vendor HID identifier.
Enumerator |
---|
VENDOR_ID_LOGITECH | |
VENDOR_ID_3DCONNEXION | |
◆ WNT_HIDSpaceMouse()
◆ HidToSpaceKey()
Convert key state bit into virtual key.
◆ IsKeyState()
bool WNT_HIDSpaceMouse::IsKeyState |
( |
| ) |
const |
|
inline |
Return TRUE for key state data chunk.
◆ IsKnownProduct()
Return if product id is known by this class.
◆ IsRotation()
bool WNT_HIDSpaceMouse::IsRotation |
( |
| ) |
const |
|
inline |
Return TRUE if data chunk defines new rotation values.
◆ IsTranslation()
bool WNT_HIDSpaceMouse::IsTranslation |
( |
| ) |
const |
|
inline |
Return TRUE if data chunk defines new translation values.
◆ KeyState()
uint32_t WNT_HIDSpaceMouse::KeyState |
( |
| ) |
const |
|
inline |
◆ RawValueRange()
int16_t WNT_HIDSpaceMouse::RawValueRange |
( |
| ) |
const |
|
inline |
Return the raw value range.
◆ Rotation()
Return new rotation values.
- Parameters
-
theIsIdle | [out] flag indicating idle state (no rotation) |
theIsQuadric | [in] flag to apply non-linear scale factor |
- Returns
- vector of 3 elements defining rotation values within [-1..1] range, 0 meaning idle, .x defining tilt, .y defining roll and .z defining spin.
◆ SetRawValueRange()
void WNT_HIDSpaceMouse::SetRawValueRange |
( |
int16_t |
theRange | ) |
|
|
inline |
◆ Translation()
Return new translation values.
- Parameters
-
theIsIdle | [out] flag indicating idle state (no translation) |
theIsQuadric | [in] flag to apply non-linear scale factor |
- Returns
- vector of 3 elements defining translation values within [-1..1] range, 0 meaning idle, .x defining left/right slide, .y defining forward/backward and .z defining up/down slide.
The documentation for this class was generated from the following file: