KeyTapGestureΒΆ

Methods:

class Leap::KeyTapGesture

The KeyTapGesture class represents a tapping gesture by a finger or tool.

controller.config().setFloat("Gesture.KeyTap.MinDownVelocity", 40.0);
controller.config().setFloat("Gesture.KeyTap.HistorySeconds", .2);
controller.config().setFloat("Gesture.KeyTap.MinDistance", 8.0);
controller.config().save();

Public Functions

Vector direction()

The direction of finger tip motion.

Leap::Vector tapDirection = keytap.direction();

Return
Vector A unit direction vector if the finger tip is moving; otherwise, a zero-vector.

KeyTapGesture()

Constructs a new KeyTapGesture object.

KeyTapGesture(const Gesture & rhs)

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

 Leap::KeyTapGesture keytapGesture = Leap::Gesture::invalid();
 if(gesture.type() == Leap::KeyTapGesture::classType())
    keytapGesture = Leap::KeyTapGesture(gesture);

Pointable pointable()

The finger performing the key tap gesture.

Leap::Pointable tappingPointable = keytap.pointable();

Return
Pointable A Pointable object representing the tapping finger.

Vector position()

The position where the key tap is registered.

Leap::Vector tapPosition = keytap.position();

Return
Vector A Vector containing the coordinates of tap location.

float progress()

The progress value is always 1.0 for a key tap gesture.

Return
float The value 1.0.

Public Static Functions

Type classType()

The key tap gesture type.

if(gesture.type() == Leap::KeyTapGesture::classType())
    Leap::KeyTapGesture keytapGesture = Leap::KeyTapGesture(gesture);

Return
Type The type value designating a key tap gesture.