opensurgsim
Public Member Functions | List of all members
MovingSquareGlutWindow Class Reference

A simple listener to display the simple scene composed of a square and tool for the example application. More...

#include <MovingSquareGlutWindow.h>

Inheritance diagram for MovingSquareGlutWindow:
SurgSim::Input::InputConsumerInterface

Public Member Functions

 MovingSquareGlutWindow (const std::string &toolDeviceName, const std::string &squareDeviceName)
 Constructor.
 
 ~MovingSquareGlutWindow ()
 Destructor.
 
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).
 

Detailed Description

A simple listener to display the simple scene composed of a square and tool for the example application.

Includes support for the square being moved by a second tool.

See also
SurgSim::Input::InputConsumerInterface

Member Function Documentation

§ handleInput()

void MovingSquareGlutWindow::handleInput ( const std::string &  device,
const SurgSim::DataStructures::DataGroup inputData 
)
overridevirtual

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
deviceThe 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).
inputDataThe application input state coming from the device.

Implements SurgSim::Input::InputConsumerInterface.

§ initializeInput()

void MovingSquareGlutWindow::initializeInput ( const std::string &  device,
const SurgSim::DataStructures::DataGroup inputData 
)
overridevirtual

Set the initial input data group.

Parameters
deviceThe 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).
inputDataThe application input state coming from the device.

Implements SurgSim::Input::InputConsumerInterface.


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