4 using SiliconStudio.Core.Collections;
6 namespace SiliconStudio.
Paradox.DataModel
10 FastListStruct<Channel> channels =
new FastListStruct<Channel>(8);
29 var channelCount = channels.Count;
30 var channelItems = channels.Items;
32 for (
int i = 0; i < channelCount; ++i)
34 ProcessChannel(ref channelItems[i], newTime, location);
40 throw new NotImplementedException();
45 var currentTime = channel.CurrentTime;
46 if (newTime == currentTime)
49 var currentIndex = channel.CurrentIndex;
50 var keyFrames = channel.Curve.KeyFrames;
52 var keyFramesItems = keyFrames.Items;
53 var keyFramesCount = keyFrames.Count;
55 if (newTime > currentTime)
57 while (currentIndex + 1 < keyFramesCount - 1 && newTime >= keyFramesItems[currentIndex + 1].Time)
62 else if (newTime <= keyFramesItems[0].Time)
69 while (currentIndex - 1 >= 0 && newTime < keyFramesItems[currentIndex].Time)
75 channel.CurrentIndex = currentIndex;
76 channel.CurrentTime = newTime;
79 protected abstract void ProcessChannel(ref Channel channel,
CompressedTimeSpan newTime, IntPtr location);
81 protected struct Channel
CompressedTimeSpan CurrentTime
AnimationCurveInterpolationType
Describes how a curve should be interpolated.
AnimationCurveInterpolationType InterpolationType
Gets or sets the interpolation type.
AnimationCurveInterpolationType InterpolationType
AnimationCurve< T > Curve
override void Evaluate(CompressedTimeSpan newTime, IntPtr location)
Untyped base class for animation curves.
Typed class for animation curves.
override void Evaluate(CompressedTimeSpan newTime, object[] results)
static void SetTime(ref Channel channel, CompressedTimeSpan newTime)
void AddChannel(AnimationCurve curve, int offset)