45 #ifndef CSixenseDevicesH 46 #define CSixenseDevicesH 48 #if defined(C_ENABLE_SIXENSE_DEVICE_SUPPORT) 67 #ifndef DOXYGEN_SHOULD_SKIP_THIS 70 #define SIXENSE_BUTTON_BUMPER (0x01<<7) 71 #define SIXENSE_BUTTON_JOYSTICK (0x01<<8) 72 #define SIXENSE_BUTTON_1 (0x01<<5) 73 #define SIXENSE_BUTTON_2 (0x01<<6) 74 #define SIXENSE_BUTTON_3 (0x01<<3) 75 #define SIXENSE_BUTTON_4 (0x01<<4) 76 #define SIXENSE_BUTTON_START (0x01<<0) 77 #define SIXENSE_SUCCESS 0 78 #define SIXENSE_FAILURE -1 79 #define SIXENSE_MAX_CONTROLLERS 4 81 typedef struct _sixenseControllerData
89 unsigned char sequence_number;
91 unsigned short firmware_revision;
92 unsigned short hardware_revision;
93 unsigned short packet_type;
94 unsigned short magnetic_frequency;
97 unsigned char is_docked;
98 unsigned char which_hand;
99 unsigned char hemi_tracking_enabled;
100 } sixenseControllerData;
102 typedef struct _sixenseAllControllerData
104 sixenseControllerData controllers[4];
105 } sixenseAllControllerData;
108 #endif // DOXYGEN_SHOULD_SKIP_THIS 146 static cSixenseDevicePtr
create(
unsigned int a_deviceNumber = 0) {
return (std::make_shared<cSixenseDevice>(a_deviceNumber)); }
159 virtual bool close();
162 virtual bool calibrate(
bool a_forceCalibration =
false);
165 virtual bool getPosition(
cVector3d& a_position);
168 virtual bool getRotation(
cMatrix3d& a_rotation);
171 virtual bool getGripperAngleRad(
double& a_angle);
174 virtual bool getUserSwitches(
unsigned int& a_userSwitches);
184 static unsigned int getNumDevices();
194 static bool openLibraries();
197 static bool closeLibraries();
241 #endif //_DISABLE_SIXENSE_DEVICE_SUPPORT This class implements a 3D vector.
Definition: CVector3d.h:88
static cPrecisionClock m_timeguard
Time guard for data acquisition.
Definition: CSixenseDevices.h:220
const unsigned int C_MAX_DEVICES
Definition: CGenericDevice.h:65
This class implements a high precision clock.
Definition: CPrecisionClock.h:85
static cSixenseDevicePtr create(unsigned int a_deviceNumber=0)
Shared cPhantomDevice allocator.
Definition: CSixenseDevices.h:146
Implements a base class for haptic devices.
This class implements a 3D matrix.
Definition: CMatrix3d.h:97
This class implements a base class for haptic devices.
Definition: CGenericHapticDevice.h:280
static sixenseAllControllerData m_data
Data acquired from the controller.
Definition: CSixenseDevices.h:223
Definition: CAudioBuffer.cpp:56
std::shared_ptr< cSixenseDevice > cSixenseDevicePtr
Definition: CSixenseDevices.h:113
This class implements an interface to the Sixense Razor Hydra magnetic tracker interface.
Definition: CSixenseDevices.h:131
static unsigned int s_libraryCounter
Number of instances for this class of devices currently using the libraries.
Definition: CSixenseDevices.h:210