CircleGestureΒΆ

Methods:

class Leap::CircleGesture

The CircleGesture classes represents a circular finger movement.

Public Functions

Vector center()

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

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

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(const Gesture & rhs)

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

if(gesture.type() == Leap::Gesture::TYPE_CIRCLE){
    Leap::CircleGesture circleGesture = Leap::CircleGesture(gesture);
}

Parameters

Vector normal()

Returns the normal vector for the circle being traced.

std::string clockwiseness;
if (circle.pointable().direction().angleTo(circle.normal()) <= Leap::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.

Leap::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.