Public Member Functions | |
virtual void | onConnect (const Controller &) |
virtual void | onDeviceChange (const Controller &) |
virtual void | onDisconnect (const Controller &) |
virtual void | onExit (const Controller &) |
virtual void | onFocusGained (const Controller &) |
virtual void | onFocusLost (const Controller &) |
virtual void | onFrame (const Controller &) |
virtual void | onInit (const Controller &) |
virtual void | onServiceConnect (const Controller &) |
virtual void | onServiceDisconnect (const Controller &) |
Public Attributes | |
ros::NodeHandle | _node |
ros::Publisher | _pub_bone_only |
ros::Publisher | _pub_marker_array |
unsigned int | seq |
Definition at line 17 of file leap_hands.cpp.
void HandsListener::onConnect | ( | const Controller & | ) | [virtual] |
Called when the Controller object connects to the Leap Motion software and the Leap Motion hardware device is plugged in, or when this Listener object is added to a Controller that is already connected.
When this callback is invoked, Controller::isServiceConnected is true, Controller::devices() is not empty, and, for at least one of the Device objects in the list, Device::isStreaming() is true.
controller | The Controller object invoking this callback function. |
Reimplemented from Leap::Listener.
Definition at line 43 of file leap_hands.cpp.
void HandsListener::onDeviceChange | ( | const Controller & | ) | [virtual] |
Called when a Leap Motion controller plugged in, unplugged, or the device changes state.
State changes include changes in frame rate and entering or leaving "robust" mode. Note that there is currently no way to query whether a device is in robust mode. You can use Frame::currentFramerate() to get the framerate.
controller | The Controller object invoking this callback function. |
Reimplemented from Leap::Listener.
Definition at line 126 of file leap_hands.cpp.
void HandsListener::onDisconnect | ( | const Controller & | ) | [virtual] |
Called when the Controller object disconnects from the Leap Motion software or the Leap Motion hardware is unplugged. The controller can disconnect when the Leap Motion device is unplugged, the user shuts the Leap Motion software down, or the Leap Motion software encounters an unrecoverable error.
Note: When you launch a Leap-enabled application in a debugger, the Leap Motion library does not disconnect from the application. This is to allow you to step through code without losing the connection because of time outs.
controller | The Controller object invoking this callback function. |
Reimplemented from Leap::Listener.
Definition at line 51 of file leap_hands.cpp.
void HandsListener::onExit | ( | const Controller & | ) | [virtual] |
Called when this Listener object is removed from the Controller or the Controller instance is destroyed.
controller | The Controller object invoking this callback function. |
Reimplemented from Leap::Listener.
Definition at line 56 of file leap_hands.cpp.
void HandsListener::onFocusGained | ( | const Controller & | ) | [virtual] |
Called when this application becomes the foreground application.
Only the foreground application receives tracking data from the Leap Motion Controller. This function is only called when the controller object is in a connected state.
controller | The Controller object invoking this callback function. |
Reimplemented from Leap::Listener.
Definition at line 118 of file leap_hands.cpp.
void HandsListener::onFocusLost | ( | const Controller & | ) | [virtual] |
Called when this application loses the foreground focus.
Only the foreground application receives tracking data from the Leap Motion Controller. This function is only called when the controller object is in a connected state.
controller | The Controller object invoking this callback function. |
Reimplemented from Leap::Listener.
Definition at line 122 of file leap_hands.cpp.
void HandsListener::onFrame | ( | const Controller & | ) | [virtual] |
Called when a new frame of hand and finger tracking data is available. Access the new frame data using the Controller::frame() function.
Note, the Controller skips any pending onFrame events while your onFrame handler executes. If your implementation takes too long to return, one or more frames can be skipped. The Controller still inserts the skipped frames into the frame history. You can access recent frames by setting the history parameter when calling the Controller::frame() function. You can determine if any pending onFrame events were skipped by comparing the ID of the most recent frame with the ID of the last received frame.
controller | The Controller object invoking this callback function. |
Reimplemented from Leap::Listener.
Definition at line 60 of file leap_hands.cpp.
void HandsListener::onInit | ( | const Controller & | ) | [virtual] |
Called once, when this Listener object is newly added to a Controller.
controller | The Controller object invoking this callback function. |
Reimplemented from Leap::Listener.
Definition at line 36 of file leap_hands.cpp.
void HandsListener::onServiceConnect | ( | const Controller & | ) | [virtual] |
Called when the Leap Motion daemon/service connects to your application Controller.
controller | The Controller object invoking this callback function. |
Reimplemented from Leap::Listener.
Definition at line 136 of file leap_hands.cpp.
void HandsListener::onServiceDisconnect | ( | const Controller & | ) | [virtual] |
Called if the Leap Motion daemon/service disconnects from your application Controller.
Normally, this callback is not invoked. It is only called if some external event or problem shuts down the service or otherwise interrupts the connection.
controller | The Controller object invoking this callback function. |
Reimplemented from Leap::Listener.
Definition at line 140 of file leap_hands.cpp.
Definition at line 19 of file leap_hands.cpp.
Definition at line 21 of file leap_hands.cpp.
Definition at line 20 of file leap_hands.cpp.
unsigned int HandsListener::seq |
Definition at line 22 of file leap_hands.cpp.