#include <MyListener.h>
Protected Attributes | |
Frame | frame |
float | currentFramesPerSecond |
InteractionBox | interactionBox |
Hand | hand |
Hand | secondHand |
Quat | palmOrientation |
GestureList | gestures |
Vector | translation |
Public Member Functions | |
virtual void | onInit (const Controller &) |
virtual void | onConnect (const Controller &) |
virtual void | onDisconnect (const Controller &) |
virtual void | onExit (const Controller &) |
virtual void | onFrame (const Controller &) |
virtual void | onFocusGained (const Controller &) |
virtual void | onFocusLost (const Controller &) |
void | update (Leap::Frame frame) |
int64_t | getFrameID () |
Vector | getPalmPosition () |
Vector | getStabilizedPalmPosition () |
Vector | getPalmNormal () |
Quat | getPalmRotation () |
FingerList | getFingers () |
FingerList | getSecondHandFingers () |
Hand | getHand () |
Hand | getSecondHand () |
Vector | getHandSphereCenter () |
float | getHandSphereRadius () |
GestureList | getGestures () |
Vector | getTranslation () |
InteractionBox | getInteractionBox () |
float | getFPS () |
float | getCurrentFramesPerSecond () |
![]() | |
LEAP_EXPORT | Listener () |
virtual LEAP_EXPORT | ~Listener () |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
Called when the Controller object connects to the Leap software, or when this Listener object is added to a Controller that is already connected.
controller | The Controller object invoking this callback function. |
Reimplemented from Leap::Listener.
|
virtual |
Called when the Controller object disconnects from the Leap software. The controller can disconnect when the Leap device is unplugged, the user shuts the Leap software down, or the Leap software encounters an unrecoverable error.
Note: When you launch a Leap-enabled application in a debugger, the Leap 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.
|
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.
|
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.
|
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.
|
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.
|
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.
void MyListener::update | ( | Leap::Frame | frame | ) |