A class implementing the communication with a multi-axis controller input device, for example a 3DConnexion SpaceNavigator.
More...
|
| | MultiAxisDevice (const std::string &uniqueName) |
| | Constructor. More...
|
| |
|
| SURGSIM_CLASSNAME (SurgSim::Devices::MultiAxisDevice) |
| |
| void | setPositionScale (double scale) |
| | Sets the position scale for this device. More...
|
| |
| double | getPositionScale () const |
| | Gets the position scale for this device. More...
|
| |
| void | setOrientationScale (double scale) |
| | Sets the orientation scale for this device. More...
|
| |
| double | getOrientationScale () const |
| | Gets the orientation scale for this device. More...
|
| |
| void | setAxisDominance (bool onOff) |
| | Turns on or off the axis dominance setting for this device. More...
|
| |
| bool | isUsingAxisDominance () const |
| | Gets the axis dominance setting for this device. More...
|
| |
| void | setReset (const std::string &name) |
| | Sets the string name of the boolean entry that will reset the pose to its initial value. More...
|
| |
| | FilteredDevice (const std::string &name) |
| | Constructor. More...
|
| |
|
| SURGSIM_CLASSNAME (SurgSim::Devices::FilteredDevice) |
| |
|
virtual | ~FilteredDevice () |
| | Destructor.
|
| |
|
std::string | getName () const override |
| | Return a (hopefully unique) device name.
|
| |
| bool | initialize () override |
| | Fully initialize the device. More...
|
| |
| bool | isInitialized () const override |
| |
|
bool | addInputConsumer (std::shared_ptr< Input::InputConsumerInterface > inputConsumer) override |
| |
|
bool | removeInputConsumer (std::shared_ptr< Input::InputConsumerInterface > inputConsumer) override |
| |
|
void | clearInputConsumers () override |
| | Removes all InputConsumers.
|
| |
|
bool | setOutputProducer (std::shared_ptr< Input::OutputProducerInterface > outputProducer) override |
| |
|
bool | removeOutputProducer (std::shared_ptr< Input::OutputProducerInterface > outputProducer) override |
| |
| bool | hasOutputProducer () override |
| | Query if this object has output producer. More...
|
| |
|
void | clearOutputProducer () override |
| | Removes any OutputProducer.
|
| |
| void | setDevice (std::shared_ptr< Input::DeviceInterface > device) |
| | Sets the raw/base device. More...
|
| |
| void | addFilter (std::shared_ptr< DeviceFilter > filter) |
| | Adds a DeviceFilter. More...
|
| |
| const std::vector< std::shared_ptr< Input::DeviceInterface > > & | getDevices () const |
| |
| bool | setDevices (const std::vector< std::shared_ptr< Input::DeviceInterface >> &devices) |
| | Sets the devices. More...
|
| |
|
virtual | ~DeviceInterface () |
| | Virtual destructor (empty).
|
| |
| virtual std::string | getClassName () const =0 |
| | The class name for this class. More...
|
| |
| virtual bool | addInputConsumer (std::shared_ptr< InputConsumerInterface > inputConsumer)=0 |
| | Adds an input consumer that will be notified when the application input state is updated. More...
|
| |
| virtual bool | removeInputConsumer (std::shared_ptr< InputConsumerInterface > inputConsumer)=0 |
| | Removes an input consumer previously added via addInputConsumer. More...
|
| |
| virtual bool | setOutputProducer (std::shared_ptr< OutputProducerInterface > outputProducer)=0 |
| | Sets an output producer that will be asked for application output state when the device needs it. More...
|
| |
| virtual bool | removeOutputProducer (std::shared_ptr< OutputProducerInterface > outputProducer)=0 |
| | Removes an output producer previously added via setOutputProducer. More...
|
| |
|
| Accessible () |
| | Default Constructor.
|
| |
|
| ~Accessible () |
| | Destructor.
|
| |
| template<class T > |
| T | getValue (const std::string &name) const |
| | Retrieves the value with the name by executing the getter if it is found and tries to convert it to the given type. More...
|
| |
| boost::any | getValue (const std::string &name) const |
| | Retrieves the value with the name by executing the getter if it is found. More...
|
| |
| template<class T > |
| bool | getValue (const std::string &name, T *value) const |
| | Retrieves the value with the name by executing the getter if it is found, and converts it to the type of the output parameter. More...
|
| |
| void | setValue (const std::string &name, const boost::any &value) |
| | Sets a value of a property that has setter. More...
|
| |
| bool | isReadable (const std::string &name) const |
| | Check whether a property is readable. More...
|
| |
| bool | isWriteable (const std::string &name) const |
| | Check whether a property is writable. More...
|
| |
| void | setGetter (const std::string &name, GetterType func) |
| | Sets a getter for a given property. More...
|
| |
| void | setSetter (const std::string &name, SetterType func) |
| | Sets a setter for a given property. More...
|
| |
| void | setAccessors (const std::string &name, GetterType getter, SetterType setter) |
| | Sets the accessors getter and setter in one function. More...
|
| |
| void | removeAccessors (const std::string &name) |
| | Removes all the accessors (getter and setter) for a given property. More...
|
| |
| void | forwardProperty (const std::string &name, const Accessible &target, const std::string &targetProperty) |
| | Adds a property with the given name that uses the targets accessors, in effect forwarding the value to the target. More...
|
| |
| void | setSerializable (const std::string &name, EncoderType encoder, DecoderType decoder) |
| | Sets the functions used to convert data from and to a YAML::Node. More...
|
| |
| void | setDecoder (const std::string &name, DecoderType decoder) |
| | Sets the functions used to convert data from a YAML::Node. More...
|
| |
| YAML::Node | encode () const |
| | Encode this Accessible to a YAML::Node. More...
|
| |
| void | decode (const YAML::Node &node, const std::vector< std::string > &ignoredProperties=std::vector< std::string >()) |
| | Decode this Accessible from a YAML::Node, will throw an exception if the data type cannot be converted. More...
|
| |
|
std::vector< std::string > | getProperties () |
| |
|
template<> |
| boost::any | getValue (const std::string &name) const |
| |
A class implementing the communication with a multi-axis controller input device, for example a 3DConnexion SpaceNavigator.
This object will integrate the output of the physical device, treating it as a differential device. In other words, holding the controller moves the pose and releasing the controller lets the pose hold steady in its new state.
- Application input provided by the device:
| type | name | |
| pose | "pose" | Absolute device pose (units are ill-defined, but nominally meters). |
| bool | "button1" | True if button 1 exists and is pressed. |
| bool | "button2" | True if button 2 exists and is pressed. |
| bool | "button3" | True if button 3 exists and is pressed. |
| bool | "button4" | True if button 4 exists and is pressed. |
- Application output used by the device:
| type | name | |
| bool | "led1" | If the device has at least one LED light, controls the first one. |
| pose | "pose" | This resets the builtin integrator to the give pose |
- See also
- RawMultiAxisDevice