Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    ComputeAnimationCurve<T> Class

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

    A node which describes a binary operation between two compute curves

    System.Object → System.Collections.Generic.Comparer<AnimationKeyFrame<T>> → ComputeAnimationCurve<T>
    Derived from ComputeAnimationCurve<T>: ComputeAnimationCurveColor4 ComputeAnimationCurveFloat ComputeAnimationCurveQuaternion ComputeAnimationCurveVector2 ComputeAnimationCurveVector3 ComputeAnimationCurveVector4

    [DataContract(Inherited = true)]
    [Display("Animation", null, Expand = ExpandRule.Never)]
    public abstract class ComputeAnimationCurve<T> : Comparer<AnimationKeyFrame<T>>, IComparer<AnimationKeyFrame<T>>, IComparer, IComputeCurve<T>, IComputeCurve where T : struct
    Type Parameters
    Name Description
    T

    Sampled data's type

    Name Description
    Properties
    KeyFrames
    Methods
    Compare(AnimationKeyFrame<T>, AnimationKeyFrame<T>)
    Cubic(ref T, ref T, ref T, ref T, Single, out T)
    Evaluate(Single)

    Evaluates the compute curve's value at the specified location, usually in the [0 .. 1] range

    Linear(ref T, ref T, Single, out T)
    SampleRaw(Single)

    Unoptimized sampler which searches all the keyframes in order. Intended to be used for baking purposes only

    UpdateChanges()

    Updates any optimizations in the curve if data has changed.

    | Improve this Doc View Source

    Properties


    KeyFrames

    public TrackingCollection<AnimationKeyFrame<T>> KeyFrames { get; set; }
    Property Value
    Type Description
    TrackingCollection<AnimationKeyFrame<T>>
    | Improve this Doc View Source

    Methods


    Compare(AnimationKeyFrame<T>, AnimationKeyFrame<T>)

    public override int Compare(AnimationKeyFrame<T> x, AnimationKeyFrame<T> y)
    Parameters
    Type Name Description
    AnimationKeyFrame<T> x
    AnimationKeyFrame<T> y
    Returns
    Type Description
    System.Int32
    Overrides
    System.Collections.Generic.Comparer<Stride.Animations.AnimationKeyFrame<T>>.Compare(Stride.Animations.AnimationKeyFrame<T>, Stride.Animations.AnimationKeyFrame<T>)

    Cubic(ref T, ref T, ref T, ref T, Single, out T)

    public abstract void Cubic(ref T value1, ref T value2, ref T value3, ref T value4, float t, out T result)
    Parameters
    Type Name Description
    T value1
    T value2
    T value3
    T value4
    System.Single t
    T result

    Evaluate(Single)

    Evaluates the compute curve's value at the specified location, usually in the [0 .. 1] range

    public T Evaluate(float location)
    Parameters
    Type Name Description
    System.Single location

    Location to sample at

    Returns
    Type Description
    T

    Sampled value


    Linear(ref T, ref T, Single, out T)

    public abstract void Linear(ref T value1, ref T value2, float t, out T result)
    Parameters
    Type Name Description
    T value1
    T value2
    System.Single t
    T result

    SampleRaw(Single)

    Unoptimized sampler which searches all the keyframes in order. Intended to be used for baking purposes only

    protected T SampleRaw(float t)
    Parameters
    Type Name Description
    System.Single t

    Location t to sample at, between 0 and 1

    Returns
    Type Description
    T

    Sampled and interpolated data value


    UpdateChanges()

    Updates any optimizations in the curve if data has changed.

    public bool UpdateChanges()
    Returns
    Type Description
    System.Boolean

    true there were changes since the last time; otherwise, false.


    Inherited Members

    System.Collections.Generic.Comparer<Stride.Animations.AnimationKeyFrame<T>>.Create(System.Comparison<Stride.Animations.AnimationKeyFrame<T>>)
    System.Collections.Generic.Comparer<Stride.Animations.AnimationKeyFrame<T>>.System.Collections.IComparer.Compare(System.Object, System.Object)
    System.Collections.Generic.Comparer<Stride.Animations.AnimationKeyFrame<T>>.Default

    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