Class Leap::HandUtils

class Leap.HandUtils

Utility methods for constructing and manipulating Leap hand object data.

Public Static Functions

static void Fill (this Hand toFill, long frameID, int id, float confidence, float grabStrength, float pinchStrength, float pinchDistance, float palmWidth, bool isLeft, float timeVisible, Finger[] fingers, Vector3 palmPosition, Vector3 stabilizedPalmPosition, Vector3 palmVelocity, Vector3 palmNormal, Quaternion rotation, Vector3 direction, Vector3 wristPosition)

Fills the Hand object with the provided hand data. You can pass null for the fingers input; this will leave the hand’s finger data unmodified.

static void Fill (this Bone toFill, Vector3 prevJoint, Vector3 nextJoint, Vector3 center, Vector3 direction, float length, float width, Bone.BoneType type, Quaternion rotation)

Fills the Bone object with the provided bone data.

static void Fill (this Finger toFill, long frameId, int handId, int fingerId, float timeVisible, Vector3 tipPosition, Vector3 direction, float width, float length, bool isExtended, Finger.FingerType type, Bone metacarpal = null, Bone proximal = null, Bone intermediate = null, Bone distal = null)

Fills the Finger object with the provided finger data. You can pass null for bones; A null bone will not modify the underlying hand’s data for that bone.

static void Fill (this Arm toFill, Vector3 elbow, Vector3 wrist, Vector3 center, Vector3 direction, float length, float width, Quaternion rotation)

Fills the Arm object with the provided arm data.

static void FillTemporalData (this Hand toFill, Hand previousHand, float deltaTime)

Fills the hand’s PalmVelocity data based on the previous hand object and the provided delta time between the two hands.

static Hand GetHand (this Frame frame, Chirality whichHand)

Finds a hand in the given frame.

Return

The first hand of the argument whichHand found in the argument frame.

static Hand Get (this LeapProvider provider, Chirality whichHand)

Finds a hand in the current frame.

Return

The first hand of the argument whichHand found in the current frame of the argument provider.

static Hand GetHand (this LeapProvider provider, Chirality whichHand)

Finds a hand in the current frame.

Return

The first hand of the argument whichHand found in the current frame of the argument provider.