interface MAGES::Interaction::IHandPoseVisualizer

Overview

An object that can visualize a hand pose. More…

interface IHandPoseVisualizer
{
    // properties

    bool HandPoseVisualEnabled;
    bool IsInPoseArea;
    int HandPoseVisualizerIndex;

    // methods

    void SetHandPose(HandPose pose);

    void SetHandPose(
        HandPose pose,
        float interpolationDuration,
        Action<HandPose> onInterpolationFinished
    );

    bool CreateAutomaticHandPose(HandPose pose, IInteractable interactable);
    void ResetDefaultHandPose();
    void GetCurrentHandPose(HandPose result);
};

// direct descendants

class HandTrackingInteractor;
class HandInteractor;
class ToolInteractor;

Detailed Documentation

An object that can visualize a hand pose.

Properties

bool HandPoseVisualEnabled

Gets or sets a value indicating whether the hand pose visual is enabled.

bool IsInPoseArea

Gets or sets a value indicating whether the interactor is inside a pose area.

int HandPoseVisualizerIndex

Gets the index for the hand pose visualizer. Used to find the HandPoses for this visualizer.

Methods

void SetHandPose(HandPose pose)

Sets the current pose to the given one.

Parameters:

pose

The pose to set.

void SetHandPose(
    HandPose pose,
    float interpolationDuration,
    Action<HandPose> onInterpolationFinished
)

Sets the current pose to the given one.

Parameters:

pose

The pose to set.

interpolationDuration

The time to interpolate from the current pose to the given pose.

onInterpolationFinished

arg1

The action to be called when the interpolation finishes.

bool CreateAutomaticHandPose(HandPose pose, IInteractable interactable)

Creates an automatic pose from the current position/rotation and stores it in pose.

Parameters:

pose

A handpose in which the generated pose will be stored to.

interactable

The interactable for which to create and automatic hand pose.

Returns:

If the automatic pose was generated successfully.

void ResetDefaultHandPose()

Resets the hand pose to the default.

Use it after calling SetHandPose(HandPose) in order to go back to the default hand pose.

void GetCurrentHandPose(HandPose result)

Gets the current hand pose and stores it in the given handpose result.

Parameters:

result

The handpose in which to store the result.