TrackedQuadΒΆ
Methods:
Note: This class is an experimental API for internal use only.
It may be removed without warning.
Represents a quad-like object tracked by the Leap Motion sensors.
Only one quad can be tracked. Once a supported quad is tracked, the state of that quad will be updated for each frame of Leap Motion tracking data.
A TrackedQuad object represents the state of the quad at one moment in time. Get a new object from subsequent frames to get the latest state information.
Public Functions
- Since
- 2.2.6
Public Static Functionsboolean equals(TrackedQuad arg0)Compares quad objects for equality.
- Since
- 2.2.6
float height()The physical height of the quad display area in millimeters.
TrackedQuad quad = frame.trackedQuad(); float displayHeight = quad.height();
- Since
- 2.2.6
ImageList images()The images from which the state of this TrackedQuad was derived.
These are the same image objects that you can get from the Controller or Frame object from which you got this TrackedQuad.
TrackedQuad quad = frame.trackedQuad(); Image leftImage = quad.images().get(0); Image rightImage = quad.images().get(1);
- Since
- 2.2.6
boolean isValid()Reports whether this is a valid object.
TrackedQuad quad = frame.trackedQuad(); if(quad.isValid()){ // Use the quad data... }
- Since
- 2.2.6
MaskList masks()The list of masks for the current set of images.
A mask is a bitmap indicating which pixels in the image contain fingers or part of the hand in front of the quad.
The mask at index 0 corresponds to the left image; that with index 1, to the right image.
TrackedQuad quad = frame.trackedQuad(); Mask leftMask = quad.masks().get(0); Mask rightMask = quad.masks().get(1);
- Since
- 2.2.6
Matrix orientation()The orientation of the quad within the Leap Motion frame of reference.
TrackedQuad quad = frame.trackedQuad(); Matrix quadOrientation = quad.orientation();
- Since
- 2.2.6
Vector position()The position of the center of the quad display area within the Leap Motion frame of reference.
In millimeters.
TrackedQuad quad = frame.trackedQuad(); Vector quadPosition = quad.position();
- Since
- 2.2.6
int resolutionX()The horizontal resolution of the quad display area in pixels.
This value is set in a configuration file. It is not determined dynamically.
TrackedQuad quad = frame.trackedQuad(); int horizontalResolution = quad.resolutionX();
- Since
- 2.2.6
int resolutionY()The vertical resolution of the quad display area in pixels.
This value is set in a configuration file. It is not determined dynamically.
TrackedQuad quad = frame.trackedQuad(); int verticalResolution = quad.resolutionY();
- Since
- 2.2.6
TrackedQuad()Constructs a new TrackedQuad object.
Do not use. Get valid TrackedQuads from a Controller or Frame object.
Controller controller = new Controller(); TrackedQuad quad = controller.trackedQuad();Controller controller = new Controller(); Frame frame = controller.frame(); TrackedQuad quad = frame.trackedQuad();
- Since
- 2.2.6
boolean visible()Reports whether the quad is currently detected within the Leap Motion field of view.
TrackedQuad quad = frame.trackedQuad(); if (quad.visible()) { Vector position = quad.position(); Matrix orientation = quad.orientation(); } else { //Get position and orientation from quad, if available }
- Since
- 2.2.6
float width()The physical width of the quad display area in millimeters.
TrackedQuad quad = frame.trackedQuad(); float displayWidth = quad.width();
- Since
- 2.2.6