GlutWindow Class Reference
Inheritance diagram for GlutWindow:

## Public Member Functions

| GlutWindow ()
| ~GlutWindow ()
void | initializeInput (const std::string &device, const SurgSim::DataStructures::DataGroup &inputData) override
| Set the initial input data group. More...
void | handleInput (const std::string &device, const SurgSim::DataStructures::DataGroup &inputData) override
| Notifies the consumer that the application input coming from the device has been updated. More...
Public Member Functions inherited from SurgSim::Input::InputConsumerInterface
virtual | ~InputConsumerInterface ()
| Virtual destructor (empty). More...

## Private Attributes

boost::thread | m_renderThread
std::shared_ptr< GlutCamera > | m_camera
size_t | m_numHands
std::unordered_map< std::string, std::shared_ptr< GlutSphere > > | m_spheres
std::shared_ptr< GlutImage > | m_leftView
std::shared_ptr< GlutImage > | m_rightView

## Constructor & Destructor Documentation

## GlutWindow()

GlutWindow::GlutWindow | ( |  | ) |

inline

## ~GlutWindow()

GlutWindow::~GlutWindow | ( |  | ) |

inline

## Member Function Documentation

## handleInput()

void GlutWindow::handleInput | ( | const std::string & | device,
|  | const SurgSim::DataStructures::DataGroup & | inputData
| ) |  |

inline override virtual

Notifies the consumer that the application input coming from the device has been updated.

Typical input data contents (but note that individual devices may do things differently):

type | name |
--- | --- | ---
pose | "pose" | Device pose (units are meters).
bool | "button1" | State of the first device button.
bool | "button2" | State of the second device button (and so on).

Other possible contents includes:

type | name |
--- | --- | ---
bool | "isHomed" | Device homing status.
bool | "isHomedX" | Individual homing status for the X axis (and so on).
bool | "isHeld" | Safety sensor etc. status.
string | "model" | Device model description.
string | "serial" | Serial number string.
(any) | "debug:*" | Various debugging information

Parameters

  device | The name of the device that is producing the input. This should only be used to identify the device (e.g. if the consumer is listening to several devices at once).
  inputData | The application input state coming from the device.

Implements SurgSim::Input::InputConsumerInterface.

## initializeInput()

void GlutWindow::initializeInput | ( | const std::string & | device,
|  | const SurgSim::DataStructures::DataGroup & | inputData
| ) |  |

inline override virtual

Set the initial input data group.

Parameters

  device | The name of the device that is producing the input. This should only be used to identify the device (e.g. if the consumer is listening to several devices at once).
  inputData | The application input state coming from the device.

Implements SurgSim::Input::InputConsumerInterface.

## Member Data Documentation

## m_camera

std::shared_ptr<GlutCamera> GlutWindow::m_camera

private

## m_leftView

std::shared_ptr<GlutImage> GlutWindow::m_leftView

private

## m_numHands

size_t GlutWindow::m_numHands

private

## m_renderThread

boost::thread GlutWindow::m_renderThread

private

## m_rightView

std::shared_ptr<GlutImage> GlutWindow::m_rightView

private

## m_spheres

std::unordered_map<std::string, std::shared_ptr<GlutSphere> > GlutWindow::m_spheres

private

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

- SurgSim/Devices/Leap/VisualTest/main.cpp