日本語翻訳ドキュメントはサポートを終了しました

MRTK 2.6 以降のドキュメントについては、公式の Microsoft ドキュメント を参照してください。

    Show / Hide Table of Contents

    Class InputAnimation

    Contains a set of animation curves that describe motion of camera and hands.

    Inheritance
    Object
    InputAnimation
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Microsoft.MixedReality.Toolkit.Input
    Assembly: cs.temp.dll.dll
    Syntax
    [Serializable]
    public class InputAnimation

    Constructors

    InputAnimation()

    Declaration
    public InputAnimation()

    Fields

    jointCount

    Declaration
    protected static readonly int jointCount
    Field Value
    Type Description
    Int32

    Properties

    CameraCurves

    Declaration
    public InputAnimation.PoseCurves CameraCurves { get; }
    Property Value
    Type Description
    InputAnimation.PoseCurves

    Duration

    Declaration
    public float Duration { get; }
    Property Value
    Type Description
    Single

    markerCount

    Declaration
    public int markerCount { get; }
    Property Value
    Type Description
    Int32

    Methods

    AddCameraPoseKey(Single, MixedRealityPose, Single, Single)

    Add a keyframe for the camera transform.

    Declaration
    public void AddCameraPoseKey(float time, MixedRealityPose cameraPose, float positionThreshold, float rotationThreshold)
    Parameters
    Type Name Description
    Single time
    MixedRealityPose cameraPose
    Single positionThreshold
    Single rotationThreshold

    AddHandJointKey(Single, Handedness, TrackedHandJoint, MixedRealityPose, Single, Single)

    Add a keyframe for one hand joint.

    Declaration
    public void AddHandJointKey(float time, Handedness handedness, TrackedHandJoint joint, MixedRealityPose jointPose, float positionThreshold, float rotationThreshold)
    Parameters
    Type Name Description
    Single time
    Handedness handedness
    TrackedHandJoint joint
    MixedRealityPose jointPose
    Single positionThreshold
    Single rotationThreshold

    AddHandStateKey(Single, Handedness, Boolean, Boolean)

    Add a keyframe for the tracking state of a hand.

    Declaration
    public void AddHandStateKey(float time, Handedness handedness, bool isTracked, bool isPinching)
    Parameters
    Type Name Description
    Single time
    Handedness handedness
    Boolean isTracked
    Boolean isPinching

    AddMarker(InputAnimationMarker)

    Add a user-defined marker.

    Declaration
    public void AddMarker(InputAnimationMarker marker)
    Parameters
    Type Name Description
    InputAnimationMarker marker

    Clear()

    Remove all keyframes from all animation curves.

    Declaration
    public void Clear()

    CreateHandJointCurves(Handedness, TrackedHandJoint)

    Make sure the pose animation curves for the given hand joint exist.

    Declaration
    public InputAnimation.PoseCurves CreateHandJointCurves(Handedness handedness, TrackedHandJoint joint)
    Parameters
    Type Name Description
    Handedness handedness
    TrackedHandJoint joint
    Returns
    Type Description
    InputAnimation.PoseCurves

    CutoffBeforeTime(Single)

    Remove all keyframes from all animation curves with time values before the given cutoff time.

    Declaration
    public void CutoffBeforeTime(float time)
    Parameters
    Type Name Description
    Single time
    Remarks

    If keyframes exists before the cutoff time then one preceding keyframe will be retained, so that interpolation at the cutoff time yields the same result.

    EvaluateCameraPose(Single)

    Evaluate the camera transform at the given time.

    Declaration
    public MixedRealityPose EvaluateCameraPose(float time)
    Parameters
    Type Name Description
    Single time
    Returns
    Type Description
    MixedRealityPose

    EvaluateHandJoint(Single, Handedness, TrackedHandJoint)

    Evaluate joint pose at the given time.

    Declaration
    public MixedRealityPose EvaluateHandJoint(float time, Handedness handedness, TrackedHandJoint joint)
    Parameters
    Type Name Description
    Single time
    Handedness handedness
    TrackedHandJoint joint
    Returns
    Type Description
    MixedRealityPose

    EvaluateHandState(Single, Handedness, out Boolean, out Boolean)

    Evaluate hand tracking state at the given time.

    Declaration
    public void EvaluateHandState(float time, Handedness handedness, out bool isTracked, out bool isPinching)
    Parameters
    Type Name Description
    Single time
    Handedness handedness
    Boolean isTracked
    Boolean isPinching

    FindMarkerInterval(Single)

    Find an index i in the sorted events list, such that events[i].time <= time < events[i+1].time.

    Declaration
    public int FindMarkerInterval(float time)
    Parameters
    Type Name Description
    Single time
    Returns
    Type Description
    Int32

    0 <= i < eventCount if a full interval could be found. -1 if time is less than the first event time. eventCount-1 if time is greater than the last event time.

    Remarks

    Uses binary search.

    FromStream(Stream)

    Deserialize animation data from a stream.

    Declaration
    public void FromStream(Stream stream)
    Parameters
    Type Name Description
    Stream stream

    GetMarker(Int32)

    Get the marker at the given index.

    Declaration
    public InputAnimationMarker GetMarker(int index)
    Parameters
    Type Name Description
    Int32 index
    Returns
    Type Description
    InputAnimationMarker

    RemoveMarker(Int32)

    Remove the user-defined marker at the given index.

    Declaration
    public void RemoveMarker(int index)
    Parameters
    Type Name Description
    Int32 index

    SetMarkerTime(Int32, Single)

    Change the time of the marker at the given index.

    Declaration
    public void SetMarkerTime(int index, float time)
    Parameters
    Type Name Description
    Int32 index
    Single time

    ToStream(Stream, Single)

    Serialize animation data into a stream.

    Declaration
    public void ToStream(Stream stream, float startTime)
    Parameters
    Type Name Description
    Stream stream
    Single startTime

    TryGetHandJointCurves(Handedness, TrackedHandJoint, out InputAnimation.PoseCurves)

    Get animation curves for the pose of the given hand joint, if they exist.

    Declaration
    public bool TryGetHandJointCurves(Handedness handedness, TrackedHandJoint joint, out InputAnimation.PoseCurves curves)
    Parameters
    Type Name Description
    Handedness handedness
    TrackedHandJoint joint
    InputAnimation.PoseCurves curves
    Returns
    Type Description
    Boolean
    Back to top Generated by DocFX