CircleGestureΒΆ

Properties:

Methods:

class Leap::CircleGesture

The CircleGesture classes represents a circular finger movement.

Public Functions

CircleGesture()

Constructs a new CircleGesture object.

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

CircleGesture(Gesture rhs)

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

if (gesture.Type == Gesture.GestureType.TYPE_CIRCLE) {
    CircleGesture circleGesture = new CircleGesture (gesture);
}

Parameters

Property

Vector Center

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

Vector centerPoint = circle.Center;
Return
Vector The center of the circle in mm from the Leap Motion origin.

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";
}

Return
Vector the normal vector for the circle being traced

Pointable Pointable

The finger performing the circle gesture.

Pointable circlePointable = circle.Pointable;

Return
Pointable A Pointable object representing the circling finger.

float Progress

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

float turns = circle.Progress;

Return
float A positive number indicating the gesture progress.

float Radius

The radius of the circle.

float diameter = 2 * circle.Radius;

Return
The circle radius in mm.

Public Static Functions

The circle gesture type.

if (gesture.Type == CircleGesture.ClassType ()) {
    CircleGesture circleGesture = new CircleGesture (gesture);
}

Return
Type The type value designating a circle gesture.