Properties:
Methods:
The CircleGesture classes represents a circular finger movement.
Public FunctionsPropertyCircleGesture()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
- rhs -
The Gesture instance to specialize. This Gesture instance must be a CircleGesture object.
Public Static 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.
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.
Gesture.GestureType ClassType()The circle gesture type.
if (gesture.Type == CircleGesture.ClassType ()) { CircleGesture circleGesture = new CircleGesture (gesture); }
- Return
- Type The type value designating a circle gesture.