Blender
V3.3
|
#include <GHOST_NDOFManager.h>
Public Member Functions | |
GHOST_NDOFManager (GHOST_System &) | |
virtual | ~GHOST_NDOFManager () |
virtual bool | available ()=0 |
bool | setDevice (unsigned short vendor_id, unsigned short product_id) |
void | setDeadZone (float) |
void | updateTranslation (const int t[3], uint64_t time) |
void | updateRotation (const int r[3], uint64_t time) |
void | updateButton (int button_number, bool press, uint64_t time) |
void | updateButtons (int button_bits, uint64_t time) |
bool | sendMotionEvent () |
Protected Attributes | |
GHOST_System & | m_system |
Definition at line 89 of file GHOST_NDOFManager.h.
GHOST_NDOFManager::GHOST_NDOFManager | ( | GHOST_System & | sys | ) |
Definition at line 134 of file GHOST_NDOFManager.cpp.
|
inlinevirtual |
Definition at line 92 of file GHOST_NDOFManager.h.
|
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_NDOFManagerWin32, GHOST_NDOFManagerUnix, and GHOST_NDOFManagerCocoa.
bool GHOST_NDOFManager::sendMotionEvent | ( | ) |
Processes and sends most recent raw data as an #NDOFMotion event returns whether an event was sent.
Definition at line 412 of file GHOST_NDOFManager.cpp.
References data, GHOST_WindowManager::getActiveWindow(), GHOST_System::getWindowManager(), GHOST_kFinished, GHOST_kFinishing, GHOST_kInProgress, GHOST_kNotStarted, GHOST_kStarting, m_system, nearHomePosition(), NULL, and GHOST_System::pushEvent().
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 378 of file GHOST_NDOFManager.cpp.
References GHOST_PRINTF.
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 153 of file GHOST_NDOFManager.cpp.
References Generic_HID_map, genericButtonCount, Modern3Dx_HID_map, NDOF_Spaceball5000, NDOF_SpaceExplorer, NDOF_SpaceMouseEnterprise, NDOF_SpaceMousePro, NDOF_SpaceMouseProWireless, NDOF_SpaceMouseWireless, NDOF_SpaceNavigator, NDOF_SpacePilot, NDOF_SpacePilotPro, NDOF_SpaceTraveler, NDOF_UnknownDevice, SpaceExplorer_HID_map, SpacePilot_HID_map, 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 320 of file GHOST_NDOFManager.cpp.
References GHOST_WindowManager::getActiveWindow(), GHOST_System::getWindowManager(), GHOST_kKeyEsc, GHOST_kKeyLeftAlt, GHOST_kKeyLeftControl, GHOST_kKeyLeftShift, m_system, mask(), NDOF_BUTTON_ALT, NDOF_BUTTON_CTRL, NDOF_BUTTON_ESC, NDOF_BUTTON_NONE, NDOF_BUTTON_SHIFT, and time.
Referenced by GHOST_NDOFManagerUnix::processEvents(), and updateButtons().
Definition at line 362 of file GHOST_NDOFManager.cpp.
References KDL::diff(), mask(), time, and updateButton().
Referenced by DeviceEvent().
Definition at line 277 of file GHOST_NDOFManager.cpp.
Referenced by DeviceEvent(), and GHOST_NDOFManagerUnix::processEvents().
The latest raw axis data from the device.
Definition at line 270 of file GHOST_NDOFManager.cpp.
Referenced by DeviceEvent(), and GHOST_NDOFManagerUnix::processEvents().
|
protected |
Definition at line 146 of file GHOST_NDOFManager.h.
Referenced by GHOST_NDOFManagerUnix::processEvents(), sendMotionEvent(), and updateButton().