|
Blender V4.3
|
#include <GHOST_NDOFManager.hh>
Inherited by GHOST_NDOFManagerCocoa, GHOST_NDOFManagerUnix, and GHOST_NDOFManagerWin32.
Public Member Functions | |
| virtual | ~GHOST_NDOFManager () |
| 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 | updateButton (int button_number, 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 40 of file GHOST_NDOFManager.hh.
| GHOST_NDOFManager::GHOST_NDOFManager | ( | GHOST_System & | sys | ) |
Definition at line 211 of file GHOST_NDOFManager.cc.
|
inlinevirtual |
Definition at line 43 of file GHOST_NDOFManager.hh.
|
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 662 of file GHOST_NDOFManager.cc.
References CLOG_INFO, GHOST_WindowManager::getActiveWindow(), GHOST_System::getWindowManager(), GHOST_kFinished, GHOST_kFinishing, GHOST_kInProgress, GHOST_kNotStarted, GHOST_kStarting, LOG, ndof_progress_string, nearHomePosition(), GHOST_System::pushEvent(), 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 633 of file GHOST_NDOFManager.cc.
| bool GHOST_NDOFManager::setDevice | ( | unsigned short | vendor_id, |
| unsigned short | product_id ) |
Each platform's device detection should call this use standard USB/HID identifiers.
Definition at line 241 of file GHOST_NDOFManager.cc.
References CLOG_INFO, genericButtonCount, int, 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 DeviceAdded(), and GHOST_NDOFManagerUnix::GHOST_NDOFManagerUnix().
The latest raw button data from the device use HID button encoding (not #NDOF_ButtonT).
Definition at line 509 of file GHOST_NDOFManager.cc.
References CLOG_INFO, GHOST_WindowManager::getActiveWindow(), GHOST_System::getWindowManager(), GHOST_kKeyUnknown, ghost_map_keyboard_from_ndof_buttom(), 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 GHOST_NDOFManagerUnix::processEvents(), updateButtonsArray(), and updateButtonsBitmask().
| void GHOST_NDOFManager::updateButtonsArray | ( | NDOF_Button_Array | buttons, |
| uint64_t | time, | ||
| NDOF_Button_Type | type ) |
Definition at line 586 of file GHOST_NDOFManager.cc.
References LongButton, and updateButton().
Definition at line 555 of file GHOST_NDOFManager.cc.
References diff(), mask(), and updateButton().
Referenced by DeviceEvent().
Definition at line 388 of file GHOST_NDOFManager.cc.
References time.
Referenced by DeviceEvent(), and GHOST_NDOFManagerUnix::processEvents().
The latest raw axis data from the device.
Definition at line 381 of file GHOST_NDOFManager.cc.
References time.
Referenced by DeviceEvent(), and GHOST_NDOFManagerUnix::processEvents().
|
protected |
Definition at line 96 of file GHOST_NDOFManager.hh.
Referenced by GHOST_NDOFManagerUnix::processEvents(), sendMotionEvent(), and updateButton().