6#include <unordered_map>
122 const std::vector<std::vector<Buttons>>* buttonsMapPtr_ =
nullptr;
130 std::vector<std::vector<Buttons>> buttonMapCompact = {
144 std::vector<std::vector<Buttons>> buttonMapPro = {
154 std::vector<std::vector<Buttons>> buttonMapEnterprise = {
This class holds information and state of single SpaceMouse device.
Definition MRSpaceMouseDevice.h:100
void parseRawEvent(const DataPacketRaw &raw, int numBytes, Action &action) const
Parses data from raw packet to unified action
bool valid() const
Check if this device is set and valid.
void updateDevice(VendorId vId, ProductId pId)
Updates internal data by device ids (does nothing if ids is same for current device)
void resetDevice()
Invalidates this device and its state.
void processAction(const Action &action)
Definition MRSpaceMouseController.h:7
short unsigned int ProductId
Definition MRSpaceMouseDevice.h:13
Buttons
enumeration all spacemouse buttons
Definition MRSpaceMouseDevice.h:18
short unsigned int VendorId
Definition MRSpaceMouseDevice.h:12
const std::unordered_map< VendorId, std::vector< ProductId > > cVendor2Device
Definition MRSpaceMouseDevice.h:61
std::array< unsigned char, 13 > DataPacketRaw
Definition MRSpaceMouseDevice.h:14
Definition MRSpaceMouseDevice.h:91
std::bitset< size_t(Buttons::SMB_BUTTON_COUNT)> buttons
Definition MRSpaceMouseDevice.h:93
Vector3f translate
Definition MRSpaceMouseDevice.h:94
Vector3f rotate
Definition MRSpaceMouseDevice.h:95
bool btnStateChanged
Definition MRSpaceMouseDevice.h:92