All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
SurgSim::Device::TrackIRDevice Class Reference

A class implementing the communication with Natural Point TrackIR camera. More...

#include <SurgSim/Devices/TrackIR/TrackIRDevice.h>

Inheritance diagram for SurgSim::Device::TrackIRDevice:
Inheritance graph
[legend]
Collaboration diagram for SurgSim::Device::TrackIRDevice:
Collaboration graph
[legend]

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...
 
- 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...
 

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< TrackIRScaffoldm_scaffold
 Communication with hardware is handled by scaffold. More...
 

Friends

class TrackIRScaffold
 

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::DataGroupgetInputData ()
 Getter for the input data DataGroup. More...
 
const
SurgSim::DataStructures::DataGroup
getOutputData () const
 Getter for the output data DataGroup. More...
 

Detailed Description

A class implementing the communication with Natural Point TrackIR camera.

Application input provided by the device:
type name
pose "pose" Device pose (units are meters).
Application output used by the device: none.
See also
SurgSim::Input::CommonDevice, SurgSim::Input::DeviceInterface

Constructor & Destructor Documentation

SurgSim::Device::TrackIRDevice::TrackIRDevice ( const std::string &  uniqueName)
explicit

Constructor.

Parameters
uniqueNameA unique name for the device.
SurgSim::Device::TrackIRDevice::~TrackIRDevice ( )
virtual

Destructor.

Member Function Documentation

double SurgSim::Device::TrackIRDevice::defaultOrientationScale ( )
staticprivate
double SurgSim::Device::TrackIRDevice::defaultPositionScale ( )
staticprivate
bool SurgSim::Device::TrackIRDevice::finalize ( )
overridevirtual

Finalize this device, unregister this device from the scaffold.

Returns
True on success; false otherwise.

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.

bool SurgSim::Device::TrackIRDevice::initialize ( )
overridevirtual

Initialize this device, register it with the scaffold.

Returns
True on success; false otherwise.

Implements SurgSim::Input::DeviceInterface.

bool SurgSim::Device::TrackIRDevice::isInitialized ( ) const

Check whether this device is initialized.

Returns
True if this device is initialized; false otherwise.
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.

Friends And Related Function Documentation

friend class TrackIRScaffold
friend

Member Data Documentation

double SurgSim::Device::TrackIRDevice::m_orientationScale
private

Scale factor for the orientation axes; stored locally before the device is initialized.

double SurgSim::Device::TrackIRDevice::m_positionScale
private

Scale factor for the position axes; stored locally before the device is initialized.

std::shared_ptr<TrackIRScaffold> SurgSim::Device::TrackIRDevice::m_scaffold
private

Communication with hardware is handled by scaffold.


The documentation for this class was generated from the following files: