![]() |
A class implementing the communication with Natural Point TrackIR camera. More...
#include <SurgSim/Devices/TrackIR/TrackIRDevice.h>
Public Member Functions | |
TrackIRDevice (const std::string &uniqueName) | |
Constructor. More... | |
virtual | ~TrackIRDevice () |
Destructor. More... | |
virtual bool | initialize () override |
Initialize this device, register it with the scaffold. More... | |
virtual bool | finalize () override |
Finalize this device, unregister this device from the scaffold. More... | |
bool | isInitialized () const |
Check whether this device is initialized. More... | |
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... | |
![]() | |
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... | |
![]() | |
virtual | ~DeviceInterface () |
Virtual destructor (empty). More... | |
Static Private Member Functions | |
static double | defaultPositionScale () |
static double | defaultOrientationScale () |
Private Attributes | |
double | m_positionScale |
Scale factor for the position axes; stored locally before the device is initialized. More... | |
double | m_orientationScale |
Scale factor for the orientation axes; stored locally before the device is initialized. More... | |
std::shared_ptr< TrackIRScaffold > | m_scaffold |
Communication with hardware is handled by scaffold. More... | |
Friends | |
class | TrackIRScaffold |
Additional Inherited Members | |
![]() | |
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 Natural Point TrackIR camera.
type | name | |
---|---|---|
pose | "pose" | Device pose (units are meters). |
|
explicit |
Constructor.
uniqueName | A unique name for the device. |
|
virtual |
Destructor.
|
staticprivate |
|
staticprivate |
|
overridevirtual |
Finalize this device, unregister this device from the scaffold.
Implements SurgSim::Input::DeviceInterface.
double SurgSim::Device::TrackIRDevice::getOrientationScale | ( | ) | const |
Gets the orientation scale for this device.
double SurgSim::Device::TrackIRDevice::getPositionScale | ( | ) | const |
Gets the position scale for this device.
|
overridevirtual |
Initialize this device, register it with the scaffold.
Implements SurgSim::Input::DeviceInterface.
bool SurgSim::Device::TrackIRDevice::isInitialized | ( | ) | const |
Check whether this device is initialized.
void SurgSim::Device::TrackIRDevice::setOrientationScale | ( | double | scale | ) |
Sets the orientation scale for this device.
The orientation scale controls how much the pose changes for a given device rotation. The default value for a raw device tries to correspond to the actual physical motion of the device.
void SurgSim::Device::TrackIRDevice::setPositionScale | ( | double | scale | ) |
Sets the position scale for this device.
The position scale controls how much the pose changes for a given device translation. The default value for a raw device tries to correspond to the actual physical motion of the device.
|
friend |
|
private |
Scale factor for the orientation axes; stored locally before the device is initialized.
|
private |
Scale factor for the position axes; stored locally before the device is initialized.
|
private |
Communication with hardware is handled by scaffold.