ManoMotion SDK PRO  1.4.8
ManoMotion SDK PRO API documentation
GestureInfo Struct Reference

Information about the gesture performed by the user. More...

Data Fields

ManoClass mano_class
 Class or gesture family. More...
 
ManoGestureContinuous mano_gesture_continuous
 Continuous gestures are those that are mantained throug multiple frames. More...
 
ManoGestureTrigger mano_gesture_trigger
 Trigger gestures are those that happen in one frame. More...
 
int state
 State is the information of the pose of the hand depending on each class The values go from 0 (most open) to 13 (most closed) More...
 
HandSide hand_side
 Represents which side of the hand is seen by the camera. More...
 
LeftOrRightHand left_right_hand
 Information if the hand visiable by the camera is right, left or no hand. More...
 

Detailed Description

Information about the gesture performed by the user.

Field Documentation

◆ hand_side

HandSide GestureInfo.hand_side

Represents which side of the hand is seen by the camera.

Example

private GestureInfo gesture;
// Update is called once per frame
void Update()
{
DetectHandSide(gesture);
}
// <summary>
// Checks if the current visible hand has the palm side facing the camera
// if so, then the code will be executed in this case the phone will vibrate.
// </summary>
// <param name="gesture">The current gesture being made</param>
void DetectHandSide(GestureInfo gesture)
{
if (gesture.hand_side == HandSide.Palmside)
{
//Your code here
Handheld.Vibrate();
}
}

◆ left_right_hand

LeftOrRightHand GestureInfo.left_right_hand

Information if the hand visiable by the camera is right, left or no hand.

◆ mano_class

ManoClass GestureInfo.mano_class

Class or gesture family.

Example

private GestureInfo gesture;
void Update()
{
DetectManoClass(gesture);
}
// <summary>
// Checks if the current visable hand performs a gesture from pinch family
// if so, then the code will be executed in this case the phone will vibrate.
// </summary>
// <param name="gesture">The current gesture being made</param>
void DetectManoClass(GestureInfo gesture)
{
if (gesture.mano_class == ManoClass.PINCH_GESTURE_FAMILY)
{
// Your code here
Handheld.Vibrate();
}
}

◆ mano_gesture_continuous

ManoGestureContinuous GestureInfo.mano_gesture_continuous

Continuous gestures are those that are mantained throug multiple frames.

Example

// select trigger gesture in the Unity Editor.
public ManoGestureContinuous continuousGesture;
private GestureInfo gesture;
void Update()
{
UseContinuousGesture(gesture);
}
// <summary>
// Method that will run while the selected ManoGestureContinuous is performed.
// </summary>
// <param name="gesture">The current gesture that's being performed</param>
private void UseContinuousGesture(GestureInfo gesture)
{
if (gesture.mano_gesture_continuous == continuousGesture)
{
// Code that will execute while continuous gesture is performed
}
}

◆ mano_gesture_trigger

ManoGestureTrigger GestureInfo.mano_gesture_trigger

Trigger gestures are those that happen in one frame.

Example

// Select the trigger gesture to use in the Unity Editor.
public ManoGestureTrigger triggerGesture;
private GestureInfo gesture;
void Update()
{
UseTriggerGesture(gesture);
}
// <summary>
// Method that will run once when the selected ManoGestureTrigger is performed.
// </summary>
// <param name="gesture">The current gesture that's being performed</param>
private void UseTriggerGesture(GestureInfo gesture)
{
if (gesture.mano_gesture_trigger == triggerGesture)
{
// Code that will execute when trigger gesture is performed
}
}

◆ state

int GestureInfo.state

State is the information of the pose of the hand depending on each class The values go from 0 (most open) to 13 (most closed)

Example

private GestureInfo gesture;
int closedHandState = 13;
// <summary>
// Runs every frame to print out the current state of the hand to the UI text.
// Open hand/pose = 0, partly closed = 6 and fully closed = 13.
// When no hand is detected the state value is -1.
// </summary>
void Update()
{
OpenHandState(gesture);
}
void OpenHandState(GestureInfo gesture)
{
if (gesture.state == closedHandState)
{
// Your code when the hand/pose is fully closeed
}
}

The documentation for this struct was generated from the following file:
ManoClass
ManoClass
Manoclass is the core block of the Gesture Classification.
Definition: GestureInfo.cs:9
GestureInfo.state
int state
State is the information of the pose of the hand depending on each class The values go from 0 (most o...
Definition: GestureInfo.cs:201
GestureInfo.mano_class
ManoClass mano_class
Class or gesture family.
Definition: GestureInfo.cs:103
GestureInfo.mano_gesture_continuous
ManoGestureContinuous mano_gesture_continuous
Continuous gestures are those that are mantained throug multiple frames.
Definition: GestureInfo.cs:136
GestureInfo
Information about the gesture performed by the user.
Definition: GestureInfo.cs:72
HandSide
HandSide
The HandSide gives the information of which side of the hand is being detected with respect to the ca...
Definition: GestureInfo.cs:21
GestureInfo.mano_gesture_trigger
ManoGestureTrigger mano_gesture_trigger
Trigger gestures are those that happen in one frame.
Definition: GestureInfo.cs:168
ManomotionManager
The ManomotionManager handles the communication with the SDK.
Definition: ManomotionManager.cs:21
ManomotionManager.Instance
static ManomotionManager Instance
Definition: ManomotionManager.cs:198
HandInfoUnity.hand_info
HandInfo hand_info
Information about the hand
Definition: HandInfoUnity.cs:14
ManoGestureTrigger
ManoGestureTrigger
Trigger Gestures are a type of Gesture Information retrieved for a given frame when the user perfoms ...
Definition: GestureInfo.cs:32
GestureInfo.hand_side
HandSide hand_side
Represents which side of the hand is seen by the camera.
Definition: GestureInfo.cs:234
ManoGestureContinuous
ManoGestureContinuous
Similar to Manoclass Continuous Gestures are Gesture Information that is being updated on every frame...
Definition: GestureInfo.cs:50
HandInfo.gesture_info
GestureInfo gesture_info
Information about hand gestures.
Definition: HandInfo.cs:31