|
A class implementing the communication with one Sixense controller, for example one of the two on the Razer Hydra. More...
#include <SurgSim/Devices/Sixense/SixenseDevice.h>
Public Member Functions | |
| SixenseDevice (const std::string &uniqueName) | |
| Constructor. More... | |
| virtual | ~SixenseDevice () |
| Destructor. More... | |
| virtual bool | initialize () override |
| Fully initialize the device. More... | |
| virtual bool | finalize () override |
| Finalize (de-initialize) the device. More... | |
| bool | isInitialized () const |
| Check wheter this device is initialized. More... | |
Public Member Functions inherited from SurgSim::Input::CommonDevice | |
| CommonDevice (const std::string &name) | |
| Constructor. More... | |
| CommonDevice (const std::string &name, const SurgSim::DataStructures::DataGroup &inputData) | |
| Constructor. More... | |
| CommonDevice (const std::string &name, SurgSim::DataStructures::DataGroup &&inputData) | |
| Constructor. More... | |
| virtual | ~CommonDevice () |
| Destructor. More... | |
| virtual std::string | getName () const override |
| Return a (hopefully unique) device name. More... | |
| void | setNameForCallback (const std::string &name) |
| Set the name used for calling the input consumers and output producer. More... | |
| std::string | getNameForCallback () const |
| Get the name used for calling the input consumers and output producer. More... | |
| virtual bool | addInputConsumer (std::shared_ptr< InputConsumerInterface > inputConsumer) override |
| Connect this device to an InputConsumerInterface, which will receive the data that comes from this device. More... | |
| virtual bool | removeInputConsumer (std::shared_ptr< InputConsumerInterface > inputConsumer) override |
| Disconnect this device from an InputConsumerInterface, which will no longer receive data from this device. More... | |
| virtual bool | setOutputProducer (std::shared_ptr< OutputProducerInterface > outputProducer) override |
| Connect this device to an OutputProducerInterface, which will send data to this device. More... | |
| virtual bool | removeOutputProducer (std::shared_ptr< OutputProducerInterface > outputProducer) override |
| Disconnect this device from an OutputProducerInterface, which will no longer send data to this device. More... | |
| virtual bool | hasOutputProducer () override |
| Getter for whether or not this device is connected with an OutputProducerInterface. More... | |
Public Member Functions inherited from SurgSim::Input::DeviceInterface | |
| virtual | ~DeviceInterface () |
| Virtual destructor (empty). More... | |
Private Attributes | |
| std::shared_ptr< SixenseScaffold > | m_scaffold |
Friends | |
| class | SixenseScaffold |
Additional Inherited Members | |
Protected Member Functions inherited from SurgSim::Input::CommonDevice | |
| virtual void | pushInput () |
| Push application input to consumers. More... | |
| virtual bool | pullOutput () |
| Pull application output from a producer. More... | |
| SurgSim::DataStructures::DataGroup & | getInputData () |
| Getter for the input data DataGroup. More... | |
| const SurgSim::DataStructures::DataGroup & | getOutputData () const |
| Getter for the output data DataGroup. More... | |
A class implementing the communication with one Sixense controller, for example one of the two on the Razer Hydra.
| type | name | |
|---|---|---|
| pose | "pose" | Device pose (units are meters). |
| scalar | "trigger" | State of the analog trigger button (0 = not pressed, 1 = fully pressed). |
| scalar | "joystickX" | Joystick X position (0 = center, -1 = fully left, +1 = fully right). |
| scalar | "joystickY" | Joystick Y position (0 = center, -1 = fully down/near, +1 = up/far). |
| bool | "buttonTrigger" | True if the analog trigger button is pressed, i.e. its value is non-zero. |
| bool | "buttonBumper" | True if the bumper button (next to the trigger) is pressed. |
| bool | "button1" | True if the button marked "1" is pressed. |
| bool | "button2" | True if the button marked "2" is pressed. |
| bool | "button3" | True if the button marked "3" is pressed. |
| bool | "button4" | True if the button marked "4" is pressed. |
| bool | "buttonStart" | True if the "start" button is pressed. |
| bool | "buttonJoystick" | True if the joystick is pressed down as a button ("into" the controller). |
|
explicit |
Constructor.
| uniqueName | A unique name for the device that will be used by the application. |
|
virtual |
Destructor.
|
overridevirtual |
Finalize (de-initialize) the device.
Implements SurgSim::Input::DeviceInterface.
|
overridevirtual |
Fully initialize the device.
When the manager object creates the device, the internal state of the device usually isn't fully initialized yet. This method performs any needed initialization.
Implements SurgSim::Input::DeviceInterface.
| bool SurgSim::Device::SixenseDevice::isInitialized | ( | ) | const |
Check wheter this device is initialized.
|
friend |
|
private |
1.8.11