Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    AnimationCurve<T> Class

    Namespace: Stride.Animations
    Assembly: Stride.Engine.dll

    Typed class for animation curves.

    System.Object → AnimationCurve → AnimationCurve<T>
    Derived from AnimationCurve<T>:

    [DataContract]
    public class AnimationCurve<T> : AnimationCurve
    Type Parameters
    Name Description
    T
    Name Description
    Constructors
    AnimationCurve()
    Properties
    ElementSize

    Gets the size of keyframe values.

    ElementType

    Gets the type of keyframe values.

    KeyFrames

    Gets or sets the key frames.

    Keys
    Methods
    AddValue(CompressedTimeSpan, IntPtr)

    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.

    FindKeyIndex(CompressedTimeSpan)

    Find key index.

    ShiftKeys(CompressedTimeSpan)

    Shifts all animation keys by the specified time, adding it to all

    | Improve this Doc View Source

    Constructors


    AnimationCurve()

    public AnimationCurve()
    | Improve this Doc View Source

    Properties


    ElementSize

    Gets the size of keyframe values.

    public override int ElementSize { get; }
    Property Value
    Type Description
    System.Int32

    The size of keyframe values.

    Overrides
    AnimationCurve.ElementSize

    ElementType

    Gets the type of keyframe values.

    public override Type ElementType { get; }
    Property Value
    Type Description
    System.Type

    The type of keyframe values.

    Overrides
    AnimationCurve.ElementType

    KeyFrames

    Gets or sets the key frames.

    public FastList<KeyFrameData<T>> KeyFrames { get; set; }
    Property Value
    Type Description
    FastList<KeyFrameData<T>>

    The key frames.


    Keys

    public override IReadOnlyList<CompressedTimeSpan> Keys { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<CompressedTimeSpan>
    Overrides
    AnimationCurve.Keys
    | Improve this Doc View Source

    Methods


    AddValue(CompressedTimeSpan, IntPtr)

    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, IntPtr location)
    Parameters
    Type Name Description
    CompressedTimeSpan newTime

    The new time.

    System.IntPtr location

    The location.

    Overrides
    AnimationCurve.AddValue(CompressedTimeSpan, IntPtr)

    FindKeyIndex(CompressedTimeSpan)

    Find key index.

    public int FindKeyIndex(CompressedTimeSpan time)
    Parameters
    Type Name Description
    CompressedTimeSpan time
    Returns
    Type Description
    System.Int32

    ShiftKeys(CompressedTimeSpan)

    Shifts all animation keys by the specified time, adding it to all

    public override void ShiftKeys(CompressedTimeSpan shiftTimeSpan)
    Parameters
    Type Name Description
    CompressedTimeSpan shiftTimeSpan

    The time span by which the keys should be shifted

    Overrides
    AnimationCurve.ShiftKeys(CompressedTimeSpan)

    Inherited Members

    AnimationCurve.InterpolationType

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation