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
Declaration
public InputAnimation.PoseCurves CameraCurves { get; }
Property Value
Declaration
public float Duration { get; }
Property Value
Declaration
public int markerCount { get; }
Property Value
Methods
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 |
|
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 |
|
Add a keyframe for the tracking state of a hand.
Declaration
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
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
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 |
|
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 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.
|
Deserialize animation data from a stream.
Declaration
public void FromStream(Stream stream)
Parameters
Type |
Name |
Description |
Stream |
stream |
|
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 |
|
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
Returns