Class MagicLeapHandTrackingFunctionLibrary
Magic Leap Hand Tracking Function Library
Inherited Members
Namespace: UE4.MagicLeapHandTracking
Assembly: UE4DotNet.dll
Syntax
public class MagicLeapHandTrackingFunctionLibrary : BlueprintFunctionLibrary
Properties
| Improve this Doc View SourceDefaultObject
Get UE4 Default Object for this Class
Declaration
public static MagicLeapHandTrackingFunctionLibrary DefaultObject { get; }
Property Value
Type | Description |
---|---|
MagicLeapHandTrackingFunctionLibrary |
StaticClass
Get UE4 Class
Declaration
public static Class StaticClass { get; }
Property Value
Type | Description |
---|---|
Class |
Methods
| Improve this Doc View SourceGetConfiguration()
Gets the list of static and dynamic gestures currently set to be identified by the gesture recognition system.
Declaration
public static (IReadOnlyCollection<EHandTrackingGesture>, EHandTrackingKeypointFilterLevel, EHandTrackingGestureFilterLevel, EHandTrackingGestureFilterLevel, bool, bool) GetConfiguration()
Returns
Type | Description |
---|---|
System.ValueTuple<System.Collections.Generic.IReadOnlyCollection<EHandTrackingGesture>, EHandTrackingKeypointFilterLevel, EHandTrackingGestureFilterLevel, EHandTrackingGestureFilterLevel, System.Boolean, System.Boolean> |
Remarks
@param StaticHandTrackingToActivate Output parameter to list the static gestures that can be detected by the system. @param KeypointsFilterLevel Filtering for the keypoints and hand centers. @param GestureFilterLevel Filtering for the static gesture recognition. @param HandSwitchingFilterLevel Filtering for if the left or right hand is present. @return true if the output params were populated with a valid value, false otherwise.
GetCurrentGesture(EControllerHand)
The current gesture being performed by the given hand.
Declaration
public static (EHandTrackingGesture, bool) GetCurrentGesture(EControllerHand Hand)
Parameters
Type | Name | Description |
---|---|---|
EControllerHand | Hand |
Returns
Type | Description |
---|---|
System.ValueTuple<EHandTrackingGesture, System.Boolean> |
Remarks
@param Hand Hand to query the gesture for. Only Left and Right hand are supported. @param Gesture Output parameter containing the given hand's gesture, or NoHand if there isn't one or the system isnt working now. @return true if the output param was populated with a valid value, false otherwise.
GetCurrentGestureConfidence(EControllerHand)
The confidence level of the current gesture being performed by the given hand.
Declaration
public static (float, bool) GetCurrentGestureConfidence(EControllerHand Hand)
Parameters
Type | Name | Description |
---|---|---|
EControllerHand | Hand |
Returns
Type | Description |
---|---|
System.ValueTuple<System.Single, System.Boolean> |
Remarks
Value is between [0, 1], 0 is low, 1 is high degree of confidence. For a NoHand, the confidence is always set to 1.
@param Hand Hand to query the gesture confidence value for. Only Left and Right hand are supported. @param Confidence Output parameter containing the confidence value for the given hand's gesture. @return true if the output param was populated with a valid value, false otherwise.
GetGestureKeypoints(EControllerHand)
List of keypoints detected on the given hand.
Declaration
public static (IReadOnlyCollection<Transform>, bool) GetGestureKeypoints(EControllerHand Hand)
Parameters
Type | Name | Description |
---|---|---|
EControllerHand | Hand |
Returns
Type | Description |
---|---|
System.ValueTuple<System.Collections.Generic.IReadOnlyCollection<Transform>, System.Boolean> |
Remarks
Note that this returns a transform in the Tracking space. To get the transform in Unreal's world space, use the MotioController component as a child of the XRPawn with hand set to the following. Special_3 - Left Index Finger Tip Special_5 - Left Thumb Tip Special_4 - Right Index Finger Tip Special_6 - Right Thumb Tip
@param Hand Hand to query the keypoints for. Only Left and Right hand are supported. @param Keypoints Output parameter containing transforms of the keypoints detected on the given hand. @return true if the output param was populated with a valid value, false otherwise.
GetGestureKeypointTransform(EControllerHand, EHandTrackingKeypoint, EGestureTransformSpace)
Get Transform for a point on the hand.
Declaration
public static (Transform, bool) GetGestureKeypointTransform(EControllerHand Hand, EHandTrackingKeypoint Keypoint, EGestureTransformSpace TransformSpace)
Parameters
Type | Name | Description |
---|---|---|
EControllerHand | Hand | |
EHandTrackingKeypoint | Keypoint | |
EGestureTransformSpace | TransformSpace |
Returns
Type | Description |
---|---|
System.ValueTuple<Transform, System.Boolean> |
Remarks
@param Hand @param Keypoint the specific joint or wrist point to fetch. @param Transform Output parameter to write the data to. @param TransformSpace Get the transform relative to the world, hand center, or tracking space. @return true if the output param was populated with a valid value, false means that is is either unchanged or populated with a stale value.
GetHandCenter(EControllerHand)
Transform of the center of the hand.
Declaration
public static (Transform, bool) GetHandCenter(EControllerHand Hand)
Parameters
Type | Name | Description |
---|---|---|
EControllerHand | Hand |
Returns
Type | Description |
---|---|
System.ValueTuple<Transform, System.Boolean> |
Remarks
Approximately the center of the palm.
Note that this returns a transform in world space.
@param Hand Hand to query the hand center transform for. Only Left and Right hand are supported. @param HandCenter Output parameter containing the position and orientation of the given hand. @return true if the output param was populated with a valid value, false means that is is either unchanged or populated with a stale value.
GetHandCenterNormalized(EControllerHand)
Normalized position of the center of the given hand.
Declaration
public static (Vector, bool) GetHandCenterNormalized(EControllerHand Hand)
Parameters
Type | Name | Description |
---|---|---|
EControllerHand | Hand |
Returns
Type | Description |
---|---|
System.ValueTuple<Vector, System.Boolean> |
Remarks
This can be used to detect and warn the users that the hand is out of the gesture detection frame.
@param Hand Hand to query the normalized hand center position for. Only Left and Right hand are supported. @param HandCenterNormalized Output paramter containing the normalized position of the given hand. @return true if the output param was populated with a valid value, false otherwise.
GetHandIndexFingerTip(EControllerHand, EGestureTransformSpace)
Transform of the Index Finger Tip.
Declaration
public static (Transform, bool) GetHandIndexFingerTip(EControllerHand Hand, EGestureTransformSpace TransformSpace)
Parameters
Type | Name | Description |
---|---|---|
EControllerHand | Hand | |
EGestureTransformSpace | TransformSpace |
Returns
Type | Description |
---|---|
System.ValueTuple<Transform, System.Boolean> |
Remarks
@param Hand Hand to query the hand center transform for. Only Left and Right hand are supported. @param TransformSpace Get the transform relative to the world, hand center, or tracking space. @param Pointer Output parameter containing the position and orientation. @return true if the output param was populated with a valid value, false means that is is either unchanged or populated with a stale value.
GetHandThumbTip(EControllerHand, EGestureTransformSpace)
Transform of Thumb Tip.
Declaration
public static (Transform, bool) GetHandThumbTip(EControllerHand Hand, EGestureTransformSpace TransformSpace)
Parameters
Type | Name | Description |
---|---|---|
EControllerHand | Hand | |
EGestureTransformSpace | TransformSpace |
Returns
Type | Description |
---|---|
System.ValueTuple<Transform, System.Boolean> |
Remarks
Note that this returns a transform in the Tracking space. To get the transform in Unreal's world space, use the MotioController component as a child of the XRPawn with hand set to EControllerHand::Special_5 for the left hand secondary and EControllerHand::Special_6 for the right hand secondary.
@param Hand Hand to query the hand center transform for. Only Left and Right hand are supported. @param TransformSpace Get the transform relative to the world, hand center, or tracking space. @param Secondary Output parameter containing the position and orientation. @return true if the output param was populated with a valid value, false means that is is either unchanged or populated with a stale value.
GetMagicLeapHandTrackingLiveLinkSource()
Get a LiveLinkSourceHandle for magic leap hand tracking.
Declaration
public static (LiveLinkSourceHandle, bool) GetMagicLeapHandTrackingLiveLinkSource()
Returns
Type | Description |
---|---|
System.ValueTuple<LiveLinkSourceHandle, System.Boolean> |
Remarks
@param SourceHandle Output parameter SourceHandle that will be filled in. @return true if a LiveLink Source was assigned.
GetStaticGestureConfidenceThreshold(EHandTrackingGesture)
Gets the minimum gesture confidence used to filter out the detected static gesture.
Declaration
public static float GetStaticGestureConfidenceThreshold(EHandTrackingGesture Gesture)
Parameters
Type | Name | Description |
---|---|---|
EHandTrackingGesture | Gesture |
Returns
Type | Description |
---|---|
System.Single |
Remarks
@param Gesture The gesture to get the confidence threshold for. @return The gesture confidence threshold.
New(UObject, Name)
Spawn an object of this class
Declaration
public static MagicLeapHandTrackingFunctionLibrary New(UObject obj = null, Name name = default(Name))
Parameters
Type | Name | Description |
---|---|---|
UObject | obj | |
Name | name |
Returns
Type | Description |
---|---|
MagicLeapHandTrackingFunctionLibrary |
SetConfiguration(Byte, EHandTrackingKeypointFilterLevel, EHandTrackingGestureFilterLevel, EHandTrackingGestureFilterLevel, Boolean)
Enables and disables the gestures to be detected by the gesture recognition system.
Declaration
public static bool SetConfiguration(byte StaticGesturesToActivate, EHandTrackingKeypointFilterLevel KeypointsFilterLevel, EHandTrackingGestureFilterLevel GestureFilterLevel, EHandTrackingGestureFilterLevel HandSwitchingFilterLevel, bool bTrackingEnabled)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | StaticGesturesToActivate | |
EHandTrackingKeypointFilterLevel | KeypointsFilterLevel | |
EHandTrackingGestureFilterLevel | GestureFilterLevel | |
EHandTrackingGestureFilterLevel | HandSwitchingFilterLevel | |
System.Boolean | bTrackingEnabled |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
@param StaticHandTrackingToActivate List of static gestures to be detected by the system. @param KeypointsFilterLevel Filtering for the keypoints and hand centers. @param GestureFilterLevel Filtering for the static gesture recognition. @param HandSwitchingFilterLevel Filtering for if the left or right hand is present. @return true if the configuration was set successfully.
SetStaticGestureConfidenceThreshold(EHandTrackingGesture, Single)
Sets the minimum gesture confidence to filter out the detected static gesture.
Declaration
public static void SetStaticGestureConfidenceThreshold(EHandTrackingGesture Gesture, float Confidence)
Parameters
Type | Name | Description |
---|---|---|
EHandTrackingGesture | Gesture | |
System.Single | Confidence |
Remarks
@param Gesture The gesture to set the confidence threshold for. @param Confidence The gesture confidence threshold.
Operators
| Improve this Doc View SourceImplicit(IntPtr to MagicLeapHandTrackingFunctionLibrary)
Convert from IntPtr to UObject
Declaration
public static implicit operator MagicLeapHandTrackingFunctionLibrary(IntPtr p)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | p |
Returns
Type | Description |
---|---|
MagicLeapHandTrackingFunctionLibrary |