Methods:
The CircleGesture classes represents a circular finger movement.
Public FunctionsVector 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.
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.Type.TYPE_CIRCLE) { CircleGesture circleGesture = new CircleGesture(gesture); }
- Parameters
- rhs -
The Gesture instance to specialize. This Gesture instance must be a CircleGesture object.
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()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.