Class InputAnimation
Contains a set of animation curves that describe motion of camera and hands.
Inheritance
InputAnimation
Assembly: cs.temp.dll.dll
[Serializable]
public class InputAnimation
Constructors
Declaration
Fields
Declaration
protected static readonly int jointCount
Field Value
Properties
Maximum duration of all animations curves.
Declaration
public float Duration { get; }
Property Value
Whether the animation has camera pose curves
Declaration
public bool HasCameraPose { get; }
Property Value
Whether the animation has eye gaze curves
Declaration
public bool HasEyeGaze { get; }
Property Value
Whether the animation has hand state and joint curves
Declaration
public bool HasHandData { get; }
Property Value
Number of markers in the animation.
Declaration
public int markerCount { get; }
Property Value
Methods
Add a keyframe for the camera transform.
Declaration
[Obsolete("Use FromRecordingBuffer to construct new InputAnimations")]
public void AddCameraPoseKey(float time, MixedRealityPose cameraPose, float positionThreshold, float rotationThreshold)
Parameters
Type |
Name |
Description |
Single |
time |
|
MixedRealityPose |
cameraPose |
|
Single |
positionThreshold |
|
Single |
rotationThreshold |
|
Add a keyframe for one hand joint.
Declaration
[Obsolete("Use FromRecordingBuffer to construct new InputAnimations")]
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 |
|
Add a keyframe for the tracking state of a hand.
Declaration
[Obsolete("Use FromRecordingBuffer to construct new InputAnimations")]
public void AddHandStateKey(float time, Handedness handedness, bool isTracked, bool isPinching)
Parameters
Add a user-defined marker.
Declaration
public void AddMarker(InputAnimationMarker marker)
Parameters
Remove all keyframes from all animation curves.
Declaration
Remove all keyframes from all animation curves with time values before the given cutoff time.
Declaration
[Obsolete("Cutoff is achieved in InputRecordingBuffer")]
public void CutoffBeforeTime(float time)
Parameters
Type |
Name |
Description |
Single |
time |
|
Evaluate the camera transform at the given time.
Declaration
public MixedRealityPose EvaluateCameraPose(float time)
Parameters
Type |
Name |
Description |
Single |
time |
|
Returns
Type |
Description |
MixedRealityPose |
|
Evaluate the eye gaze ray at the given time.
Declaration
public Ray EvaluateEyeGaze(float time)
Parameters
Type |
Name |
Description |
Single |
time |
|
Returns
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 |
|
Evaluate hand tracking state at the given time.
Declaration
public void EvaluateHandState(float time, Handedness handedness, out bool isTracked, out bool isPinching)
Parameters
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.
|
Generates an input animation from the contents of a recording buffer.
Declaration
public static InputAnimation FromRecordingBuffer(InputRecordingBuffer recordingBuffer, MixedRealityInputRecordingProfile profile)
Parameters
Returns
Deserializes animation data from a stream.
Declaration
public static InputAnimation FromStream(Stream stream)
Parameters
Type |
Name |
Description |
Stream |
stream |
|
Returns
Deserialize animation data from a stream asynchronously.
Declaration
public static Task<InputAnimation> FromStreamAsync(Stream stream, Action callback = null)
Parameters
Type |
Name |
Description |
Stream |
stream |
|
Action |
callback |
|
Returns
Get the marker at the given index.
Declaration
public InputAnimationMarker GetMarker(int index)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Returns
Remove the user-defined marker at the given index.
Declaration
public void RemoveMarker(int index)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Change the time of the marker at the given index.
Declaration
public void SetMarkerTime(int index, float time)
Parameters
Serialize animation data into a stream.
Declaration
public void ToStream(Stream stream, float startTime)
Parameters
Type |
Name |
Description |
Stream |
stream |
|
Single |
startTime |
|
Serialize animation data into a stream asynchronously.
Declaration
public Task ToStreamAsync(Stream stream, float startTime, Action callback = null)
Parameters
Type |
Name |
Description |
Stream |
stream |
|
Single |
startTime |
|
Action |
callback |
|
Returns