|
Blender V5.0
|
#include <GHOST_NDOFManager.hh>
Inherited by GHOST_NDOFManagerCocoa, GHOST_NDOFManagerUnix, and GHOST_NDOFManagerWin32.
Public Member Functions | |
| virtual | ~GHOST_NDOFManager ()=default |
| virtual bool | available ()=0 |
NDOF Manager Class | |
| GHOST_NDOFManager (GHOST_System &) | |
NDOF Device Setup | |
| bool | setDevice (unsigned short vendor_id, unsigned short product_id) |
NDOF Motion | |
| void | setDeadZone (float) |
| bool | sendMotionEvent () |
NDOF Update State | |
| void | updateTranslation (const int t[3], uint64_t time) |
| void | updateRotation (const int r[3], uint64_t time) |
Protected Attributes | |
| GHOST_System & | system_ |
NDOF Buttons | |
| void | updateButtonRAW (int button_number, bool press, uint64_t time) |
| void | updateButton (GHOST_NDOF_ButtonT button, bool press, uint64_t time) |
| void | updateButtonsBitmask (int button_bits, uint64_t time) |
| void | updateButtonsArray (NDOF_Button_Array buttons, uint64_t time, NDOF_Button_Type type) |
Definition at line 46 of file GHOST_NDOFManager.hh.
| GHOST_NDOFManager::GHOST_NDOFManager | ( | GHOST_System & | sys | ) |
Definition at line 209 of file GHOST_NDOFManager.cc.
References false, genericButtonCount, GHOST_kNotStarted, ndof_HID_map_Generic, NDOF_UnknownDevice, and system_.
Referenced by GHOST_NDOFManagerCocoa::GHOST_NDOFManagerCocoa(), GHOST_NDOFManagerUnix::GHOST_NDOFManagerUnix(), and GHOST_NDOFManagerWin32::GHOST_NDOFManagerWin32().
|
virtualdefault |
|
pure virtual |
Whether multi-axis functionality is available (via the OS or driver) does not imply that a device is plugged in or being used.
Implemented in GHOST_NDOFManagerCocoa, GHOST_NDOFManagerUnix, and GHOST_NDOFManagerWin32.
| bool GHOST_NDOFManager::sendMotionEvent | ( | ) |
Processes and sends most recent raw data as an #NDOFMotion event returns whether an event was sent.
Definition at line 664 of file GHOST_NDOFManager.cc.
References CLOG_DEBUG, data, GHOST_kFinished, GHOST_kFinishing, GHOST_kInProgress, GHOST_kNotStarted, GHOST_kStarting, LOG, ndof_progress_string, NDOF_TIME_DELTA_STARTING, nearHomePosition(), and system_.
| void GHOST_NDOFManager::setDeadZone | ( | float | dz | ) |
Filter out small/accidental/un-calibrated motions by setting up a "dead zone" around home position set to 0 to disable 0.1 is a safe and reasonable value.
Definition at line 637 of file GHOST_NDOFManager.cc.
Each platform's device detection should call this use standard USB/HID identifiers.
Definition at line 236 of file GHOST_NDOFManager.cc.
References CLOG_DEBUG, CLOG_INFO, genericButtonCount, LOG, ndof_device_names, ndof_HID_map_Generic, ndof_HID_map_Shared3Dx, ndof_HID_map_SpaceExplorer, ndof_HID_map_SpacePilot, NDOF_KeyboardPro, NDOF_NumpadPro, NDOF_Spaceball5000, NDOF_SpaceExplorer, NDOF_SpaceMouseEnterprise, NDOF_SpaceMousePro, NDOF_SpaceMouseProWireless, NDOF_SpaceMouseWireless, NDOF_SpaceNavigator, NDOF_SpacePilot, NDOF_SpacePilotPro, NDOF_SpaceTraveler, NDOF_UnknownDevice, and UINT_MAX.
Referenced by GHOST_NDOFManagerUnix::GHOST_NDOFManagerUnix().
| void GHOST_NDOFManager::updateButton | ( | GHOST_NDOF_ButtonT | button, |
| bool | press, | ||
| uint64_t | time ) |
Add the button event which has already been mapped to GHOST_NDOF_ButtonT.
Definition at line 499 of file GHOST_NDOFManager.cc.
References CLOG_DEBUG, GHOST_kKeyUnknown, ghost_map_keyboard_from_ndof_button(), GHOST_NDOF_BUTTON_INVALID, GHOST_NDOF_BUTTON_KBP_F1, GHOST_NDOF_BUTTON_KBP_F12, GHOST_NDOF_BUTTON_NP_F1, GHOST_NDOF_BUTTON_NP_F4, LOG, ndof_button_names, and system_.
Referenced by updateButtonRAW(), updateButtonsArray(), and updateButtonsBitmask().
| void GHOST_NDOFManager::updateButtonRAW | ( | int | button_number, |
| bool | press, | ||
| uint64_t | time ) |
The latest raw button data from the device use HID button encoding (not #NDOF_ButtonT).
Definition at line 535 of file GHOST_NDOFManager.cc.
References CLOG_DEBUG, LOG, and updateButton().
Referenced by GHOST_NDOFManagerUnix::processEvents().
| void GHOST_NDOFManager::updateButtonsArray | ( | NDOF_Button_Array | buttons, |
| uint64_t | time, | ||
| NDOF_Button_Type | type ) |
Definition at line 592 of file GHOST_NDOFManager.cc.
References LongButton, and updateButton().
| void GHOST_NDOFManager::updateButtonsBitmask | ( | int | button_bits, |
| uint64_t | time ) |
Definition at line 557 of file GHOST_NDOFManager.cc.
References diff(), mask(), and updateButton().
| void GHOST_NDOFManager::updateRotation | ( | const int | r[3], |
| uint64_t | time ) |
Definition at line 381 of file GHOST_NDOFManager.cc.
Referenced by GHOST_NDOFManagerUnix::processEvents().
| void GHOST_NDOFManager::updateTranslation | ( | const int | t[3], |
| uint64_t | time ) |
The latest raw axis data from the device.
Definition at line 374 of file GHOST_NDOFManager.cc.
Referenced by GHOST_NDOFManagerUnix::processEvents().
|
protected |
Definition at line 106 of file GHOST_NDOFManager.hh.
Referenced by GHOST_NDOFManager(), GHOST_NDOFManagerUnix::processEvents(), sendMotionEvent(), and updateButton().