ManoMotion Unity SDK 2.0
SDK documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Pages
ManoMotion.GestureInfo Struct Reference

Information about the gesture performed by the user.

Public Attributes

ManoClass manoClass
 Class or gesture family.
 
ManoGestureContinuous manoGestureContinuous
 Continuous gestures are those that are mantained throug multiple frames.
 
ManoGestureTrigger manoGestureTrigger
 Trigger gestures are those that happen in one frame.
 
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)
 
HandSide handSide
 Represents which side of the hand is seen by the camera.
 
LeftOrRightHand leftRightHand
 Information if the hand visiable by the camera is right, left or no hand.
 

Member Data Documentation

◆ handSide

HandSide ManoMotion.GestureInfo.handSide

Example

private GestureInfo gesture;
// Update is called once per frame
void Update()
{
gesture = ManomotionManager.Instance.HandInfos[0].gestureInfo;
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.handSide == HandSide.Palmside)
{
//Your code here
Handheld.Vibrate();
}
}
HandSide
The HandSide gives the information of which side of the hand is being detected with respect to the ca...
Definition GestureInfo.cs:20
Information about the gesture performed by the user.
Definition GestureInfo.cs:69
HandSide handSide
Represents which side of the hand is seen by the camera.
Definition GestureInfo.cs:231

◆ leftRightHand

LeftOrRightHand ManoMotion.GestureInfo.leftRightHand

◆ manoClass

ManoClass ManoMotion.GestureInfo.manoClass

Example

private GestureInfo gesture;
void Update()
{
gesture = ManomotionManager.Instance.HandInfos[0].gestureInfo;
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.manoClass == ManoClass.PINCH_GESTURE_FAMILY)
{
// Your code here
Handheld.Vibrate();
}
}
ManoClass
Manoclass is the core block of the Gesture Classification. This value will be continuously updated ba...
Definition GestureInfo.cs:9
ManoClass manoClass
Class or gesture family.
Definition GestureInfo.cs:100

◆ manoGestureContinuous

ManoGestureContinuous ManoMotion.GestureInfo.manoGestureContinuous

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
}
}
HandInfo[] HandInfos
Definition ManoMotionManagerBase.cs:81
The ManomotionManager handles the communication with the SDK.
Definition ManoMotionManager.cs:13
static ManoMotionManager Instance
Definition ManoMotionManager.cs:19
ManoGestureContinuous
Similar to Manoclass Continuous Gestures are Gesture Information that is being updated on every frame...
Definition GestureInfo.cs:47
GestureInfo gestureInfo
Information about hand gestures.
Definition HandInfo.cs:32

◆ manoGestureTrigger

ManoGestureTrigger ManoMotion.GestureInfo.manoGestureTrigger

Example

// Select the trigger gesture to use in the Unity Editor.
public ManoGestureTrigger triggerGesture;
private GestureInfo gesture;
void Update()
{
gesture = ManomotionManager.Instance.HandInfos[0].gestureInfo;
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
}
}
ManoGestureTrigger
Trigger Gestures are a type of Gesture Information retrieved for a given frame when the user perfoms ...
Definition GestureInfo.cs:30

◆ state

int ManoMotion.GestureInfo.state

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()
{
gesture = ManomotionManager.Instance.HandInfos[0].gestureInfo;
OpenHandState(gesture);
}
void OpenHandState(GestureInfo gesture)
{
if (gesture.state == closedHandState)
{
// Your code when the hand/pose is fully closeed
}
}
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:198