AnimationTrack
public sealed class AnimationTrackOne animated property of one node: a sorted key time array and the values at those times.
Values are held flat rather than as Vector3/Quaternion arrays because AnimationPath.Weights has no fixed width — a mesh with four morph targets stores four floats a key — and one storage shape that covers all four paths is worth more than the typing. AnimationTrack.Stride is that width: 3, 4, or the morph-target count.
A AnimationInterpolation.CubicSpline track stores three times as many values, as glTF does: in-tangent, value, out-tangent for every key.
Constructors
| Member | Description |
|---|---|
| Builds a track. |
Properties
| Member | Description |
|---|---|
| The last key's time. A collapsed constant track reports 0. |
| How values between keys are found. |
| Number of keys. |
| Which of the node's properties it writes. |
| Floats per key: 3 for translation and scale, 4 for rotation, the target count for weights. |
| The node this track writes to. |
Methods
| Member | Description |
|---|---|
| The value at The segment is found from a cursor rather than by binary search. Playback is monotonic and the answer is almost always the segment used last frame or the one after it, so the search is two comparisons in the common case; a seek backwards falls through to a scan, which is what a caller setting |
| Convenience over Normalised on the way out. Linear interpolation of two unit quaternions is not itself a unit quaternion, and a rotation that is fractionally short scales the geometry it is applied to — over a chain of five joints that compounds into a hand that shrinks as the arm swings. |
| Convenience over |