CircleGestureΒΆ
Notice Gestures are deprecated in version 3.0 and may not behave the same as they did in earlier versions.
Methods:
- class Leap::CircleGesture
The CircleGesture classes represents a circular finger movement.
- Public Functions
- Vector center() const
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
- rhs -
The Gesture instance to specialize. This Gesture instance must be a CircleGesture object.
- rhs -
- Vector normal() const
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() const
The finger performing the circle gesture.
Leap::Pointable circlePointable = circle.pointable();
- float progress() const
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() const
The radius of the circle.
float diameter = 2 * circle.radius();
- Return
- The circle radius in mm.
- Public Static Functions
- Type classType()
The circle gesture type.
if(gesture.type() == Leap::CircleGesture::classType()){ Leap::CircleGesture circleGesture = Leap::CircleGesture(gesture); }
- Return
- Type The type value designating a circle gesture.
C++