GestureResult

public class GestureResult

Class containing detection result for one hand.

Fields

public float confidence

Returns confidence of the hand, within [0, 1].

public GestureType gesture

Returns pre-defined gesture type.

public Vector3[] joints

Returns position of the hand joints. Meaning of this field is different based on actual mode.

NOTE: Don’t modify the array.

For 2D/3D point mode, only first element is useful, which is same as point.

For skeleton mode, keypoints of the hand.

+x is right, +y is up, +z is front. Unit is meter.

public PinchInfo pinch

Returns pinch information of hand.

public Vector3 point

Returns position of palm center. This field is guaranteed to be not null. Use this if only need hand position instead of 21 joints.

For 2D point mode, z is always 0.25.

For skeleton mode, this is position of palm.

+x is right, +y is up, +z is front. Unit is meter.

public Quaternion[] rotations

Returns rotation of the hand joints. Meaning of this field is different based on actual mode.

NOTE: Don’t modify the array.

For 2D/3D point mode, only first element is useful, which is hand rotation.

For skeleton mode, rotations 21 keypoints of the hand.

+x is right, +y is up, +z is front.

Identity rotation (assume hand is GestureType.Five gesture): palm face front and fingers point upward.

public boolean valid

Returns if this hand is detected/valid.

Constructors

GestureResult()

Constructs a gesture result and initialize array.