Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    ComputeBinaryCurve<T> Class

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

    A node which describes a binary operation between two IComputeCurve<T>

    System.Object → ComputeBinaryCurve<T>
    Derived from ComputeBinaryCurve<T>: ComputeBinaryCurveColor4 ComputeBinaryCurveFloat ComputeBinaryCurveQuaternion ComputeBinaryCurveVector2 ComputeBinaryCurveVector3 ComputeBinaryCurveVector4

    [DataContract(Inherited = true)]
    [Display("Binary Operator", null)]
    public abstract class ComputeBinaryCurve<T> : IComputeCurve<T>, IComputeCurve where T : struct
    Type Parameters
    Name Description
    T

    Sampled data's type

    Name Description
    Properties
    LeftChild

    The left child node

    Operator

    The operation used to blend the two values

    RightChild

    The right child node

    Methods
    Add(T, T)

    Adds the left value to the right value and retuns their sum

    Evaluate(Single)

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

    Multiply(T, T)

    Multiplies the left value to the right value and retuns the result

    Subtract(T, T)

    Subtracts the right value from the left value and retuns the result

    UpdateChanges()

    Updates any optimizations in the curve if data has changed.

    | Improve this Doc View Source

    Properties


    LeftChild

    The left child node

    [DataMember(20)]
    [Display("Left", null)]
    public IComputeCurve<T> LeftChild { get; set; }
    Property Value
    Type Description
    IComputeCurve<T>

    Operator

    The operation used to blend the two values

    [DataMember(10)]
    public BinaryCurveOperator Operator { get; set; }
    Property Value
    Type Description
    BinaryCurveOperator

    RightChild

    The right child node

    [DataMember(30)]
    [Display("Right", null)]
    public IComputeCurve<T> RightChild { get; set; }
    Property Value
    Type Description
    IComputeCurve<T>
    | Improve this Doc View Source

    Methods


    Add(T, T)

    Adds the left value to the right value and retuns their sum

    protected abstract T Add(T a, T b)
    Parameters
    Type Name Description
    T a

    Left value A

    T b

    Right value B

    Returns
    Type Description
    T

    The sum A + B


    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


    Multiply(T, T)

    Multiplies the left value to the right value and retuns the result

    protected abstract T Multiply(T a, T b)
    Parameters
    Type Name Description
    T a

    Left value A

    T b

    Right value B

    Returns
    Type Description
    T

    The result A * B


    Subtract(T, T)

    Subtracts the right value from the left value and retuns the result

    protected abstract T Subtract(T a, T b)
    Parameters
    Type Name Description
    T a

    Left value A

    T b

    Right value B

    Returns
    Type Description
    T

    The result A - B


    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.


    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