CircleGestureΒΆ

The CircleGesture classes represents a circular finger movement. More...

Inherits Gesture.

Public Member Functions

Vector center ()
 The center point of the circle within the Leap Motion frame of reference. More...
 
 CircleGesture ()
 Constructs a new CircleGesture object. More...
 
 CircleGesture (Gesture rhs)
 Constructs a CircleGesture object from an instance of the Gesture class. More...
 
Vector normal ()
 Returns the normal vector for the circle being traced. More...
 
Pointable pointable ()
 The finger performing the circle gesture. More...
 
float progress ()
 The number of times the finger tip has traversed the circle. More...
 
float radius ()
 The radius of the circle. More...
 
- Public Member Functions inherited from Gesture
long duration ()
 The elapsed duration of the recognized movement up to the frame containing this Gesture object, in microseconds. More...
 
float durationSeconds ()
 The elapsed duration in seconds. More...
 
boolean equals (Gesture rhs)
 Compare Gesture object equality. More...
 
Frame frame ()
 The Frame containing this Gesture instance. More...
 
 Gesture ()
 Constructs a new Gesture object. More...
 
 Gesture (Gesture rhs)
 Constructs a new copy of an Gesture object. More...
 
HandList hands ()
 The list of hands associated with this Gesture, if any. More...
 
int id ()
 The gesture ID. More...
 
boolean isValid ()
 Reports whether this Gesture instance represents a valid Gesture. More...
 
PointableList pointables ()
 The list of fingers and tools associated with this Gesture, if any. More...
 
Gesture.State state ()
 The gesture state. More...
 
String toString ()
 A string containing a brief, human-readable description of this Gesture. More...
 
Gesture.Type type ()
 The gesture type. More...
 

Static Public Member Functions

static Gesture.Type classType ()
 The circle gesture type. More...
 
- Static Public Member Functions inherited from Gesture
static Gesture invalid ()
 Returns an invalid Gesture object. More...
 

Detailed Description

The CircleGesture classes represents a circular finger movement.

Deprecated:
3.0

Constructor & Destructor Documentation

Constructs a new CircleGesture object.

An uninitialized CircleGesture object is considered invalid. Get valid instances of the CircleGesture class from a Frame object.

Deprecated:
3.0

Constructs a CircleGesture object from an instance of the Gesture class.

if(gesture.type() == Gesture.Type.TYPE_CIRCLE) {
CircleGesture circleGesture = new CircleGesture(gesture);
}
Parameters
rhsThe Gesture instance to specialize. This Gesture instance must be a CircleGesture object.
Deprecated:
3.0

Member Function Documentation

Vector center ( )

The center point of the circle within the Leap Motion frame of reference.

Vector centerPoint = circle.center();
Returns
Vector The center of the circle in mm from the Leap Motion origin.
Deprecated:
3.0
static Gesture.Type classType ( )
static

The circle gesture type.

if(gesture.type() == CircleGesture.classType()) {
CircleGesture circleGesture = new CircleGesture(gesture);
}
Returns
Type The type value designating a circle gesture.
Deprecated:
3.0
Vector normal ( )

Returns the normal vector for the circle being traced.

String clockwiseness;
if (circle.pointable().direction().angleTo(circle.normal()) <= Math.PI/2) {
clockwiseness = "clockwise";
}
else
{
clockwiseness = "counterclockwise";
}
Returns
Vector the normal vector for the circle being traced
Deprecated:
3.0
Pointable pointable ( )

The finger performing the circle gesture.

Pointable circlePointable = circle.pointable();
Returns
Pointable A Pointable object representing the circling finger.
Deprecated:
3.0
float progress ( )

The number of times the finger tip has traversed the circle.

float turns = circle.progress();
Returns
float A positive number indicating the gesture progress.
Deprecated:
3.0
float radius ( )

The radius of the circle.

float diameter = 2 * circle.radius();
Returns
The circle radius in mm.
Deprecated:
3.0