Class AnimationCurve<T>
- Namespace
 - Stride.Animations
 
- Assembly
 - Stride.Engine.dll
 
Typed class for animation curves.
[DataContract]
public class AnimationCurve<T> : AnimationCurve
  Type Parameters
T
- Inheritance
 - 
      objectAnimationCurve<T>
 
- Inherited Members
 
Constructors
AnimationCurve()
public AnimationCurve()
  Properties
ElementSize
Gets the size of keyframe values.
public override int ElementSize { get; }
  Property Value
- int
 The size of keyframe values.
ElementType
Gets the type of keyframe values.
public override Type ElementType { get; }
  Property Value
- Type
 The type of keyframe values.
KeyFrames
Gets or sets the key frames.
public FastList<KeyFrameData<T>> KeyFrames { get; set; }
  Property Value
- FastList<KeyFrameData<T>>
 The key frames.
Keys
public override IReadOnlyList<CompressedTimeSpan> Keys { get; }
  Property Value
Methods
AddValue(CompressedTimeSpan, nint)
Writes a new value at the end of the curve (used for building curves). It should be done in increasing order as it will simply add a new key at the end of KeyFrames.
public override void AddValue(CompressedTimeSpan newTime, nint location)
  Parameters
newTimeCompressedTimeSpanThe new time.
locationnintThe location.
FindKeyIndex(CompressedTimeSpan)
Find key index.
public int FindKeyIndex(CompressedTimeSpan time)
  Parameters
timeCompressedTimeSpan
Returns
ShiftKeys(CompressedTimeSpan)
Shifts all animation keys by the specified time, adding it to all Time
public override void ShiftKeys(CompressedTimeSpan shiftTimeSpan)
  Parameters
shiftTimeSpanCompressedTimeSpanThe time span by which the keys should be shifted