WVR_GetHandGestureData

Note: Right hand WVR_HandGestureType_Palm_Pinch is for System using. Developer can not get right hand WVR_HandGestureType_Palm_Pinch. Developer can get left hand WVR_HandGestureType_Palm_Pinch.

WVR_EXPORT WVR_Result WVR_GetHandGestureData(WVR_HandGestureData_t * data)

Use this function to get gesture data.

Use this API to get hand gesture state from the hand gesture module. Use this API must be called by main thread.

Version
API Level 5
Parameters
Return Value
  • WVR_Success: Successfully retrieved data.
  • others: WVR_Result the mean failure.

struct WVR_HandGestureData

The gesture information.

Public Members

int64_t timestamp

The current time in milliseconds.

WVR_HandGestureType right

Gesture type of right hand.

WVR_HandGestureType left

Gesture type of left hand.

enum WVR_HandGestureType

The gesture type.

Values:

WVR_HandGestureType_Invalid = 0

The gesture is invalid.

WVR_HandGestureType_Unknown = 1

Unknow gesture type.

WVR_HandGestureType_Fist = 2

Represent fist gesture.

WVR_HandGestureType_Five = 3

Represent five gesture.

WVR_HandGestureType_OK = 4

Represent OK gesture.

WVR_HandGestureType_ThumbUp = 5

Represent thumb up gesture.

WVR_HandGestureType_IndexUp = 6

Represent index up gesture.

WVR_HandGestureType_Palm_Pinch = 7

Represent palm pinch gesture.

WVR_HandGestureType_Yeah = 8

Represent yeah gesture.

WVR_HandGestureType_Reserved1 = 32

Reserved gesture.

WVR_HandGestureType_Reserved2 = 33

Reserved gesture.

WVR_HandGestureType_Reserved3 = 34

Reserved gesture.

WVR_HandGestureType_Reserved4 = 35

Reserved gesture.

WVR_HandGestureType_Reserved5 = 36

Reserved gesture.

WVR_HandGestureType_Reserved6 = 37

Reserved gesture.

WVR_HandGestureType_Reserved7 = 38

Reserved gesture.

WVR_HandGestureType_Reserved8 = 39

Reserved gesture.

WVR_HandGestureType_Reserved9 = 40

Reserved gesture.

WVR_HandGestureType_Reserved10 = 41

Reserved gesture.

How to use

Sample function:

#include <wvr/wvr_hand.h>

if (WVR_StartHandGesture(0x83) == WVR_Success) {
    WVR_HandGestureData data;
    if (WVR_GetHandGestureData(&data) == WVR_Success) {
        // get hand gesture data success
    } else {
        // start hand gesture failed!
    }
    WVR_StopHandGesture();
} else {
    // start hand gesture failed!
}