4 using System.Collections;
5 using System.Collections.Generic;
7 using System.Runtime.InteropServices;
8 using SiliconStudio.Core;
9 using SiliconStudio.Core.Collections;
10 using SiliconStudio.Core.Serialization;
11 using SiliconStudio.Paradox.Effects;
12 using SiliconStudio.Paradox.Graphics;
13 using SiliconStudio.Paradox.Internals;
17 namespace SiliconStudio.
Paradox.DataModel
22 [DataContract(Inherited =
true)]
39 public abstract Type ElementType {
get; }
47 public abstract int ElementSize {
get; }
49 public abstract IReadOnlyList<CompressedTimeSpan>
Keys {
get; }
61 InterpolationType = AnimationCurveInterpolationType.Linear;
77 public FastList<KeyFrameData<T>> KeyFrames {
get; set; }
80 public override Type ElementType
82 get {
return typeof(T); }
86 public override int ElementSize
88 get {
return Utilities.UnsafeSizeOf<T>(); }
92 public override IReadOnlyList<CompressedTimeSpan>
Keys
94 get {
return new LambdaReadOnlyCollection<KeyFrameData<T>,
CompressedTimeSpan>(KeyFrames, x => x.Time); }
99 KeyFrames =
new FastList<KeyFrameData<T>>();
111 int end = KeyFrames.Count - 1;
114 int middle = start + ((end - start) >> 1);
115 var middleTime = KeyFrames[middle].Time;
117 if (middleTime == time)
121 if (middleTime < time)
137 Utilities.UnsafeReadOut(location, out value);
AnimationCurveInterpolationType
Describes how a curve should be interpolated.
SiliconStudio.Paradox.Input.Keys Keys
int FindKeyIndex(CompressedTimeSpan time)
Find key index.
SiliconStudio.Core.Mathematics.Quaternion Quaternion
Untyped base class for animation curves.
SiliconStudio.Core.Mathematics.Vector3 Vector3
override void AddValue(CompressedTimeSpan newTime, IntPtr location)
Writes a new value at the end of the curve (used for building curves). It should be done in increasin...
A single key frame value.