Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    SphericalHarmonics<TDataType> Class

    Namespace: Stride.Core.Mathematics
    Assembly: Stride.Core.Mathematics.dll

    A representation of a sphere of values via Spherical Harmonics (SH).

    System.Object → SphericalHarmonics<TDataType>
    Derived from SphericalHarmonics<TDataType>: SphericalHarmonics

    [DataContract("SphericalHarmonicsGeneric")]
    public abstract class SphericalHarmonics<TDataType>
    Type Parameters
    Name Description
    TDataType

    The type of data contained by the sphere

    Name Description
    Constructors
    SphericalHarmonics(Int32)

    Initializes a new instance of the SphericalHarmonics<TDataType> class.

    Fields
    MaximumOrder

    The maximum order supported.

    Properties
    Coefficients

    Get the coefficients defining the spherical harmonics (the spherical coordinates x{l,m} multiplying the spherical base Y{l,m}).

    Item[Int32, Int32]

    Returns the coefficient x{l,m} of the spherical harmonics (the {l,m} spherical coordinate corresponding to the spherical base Y{l,m}).

    Order

    The order of calculation of the spherical harmonic.

    Methods
    Evaluate(Vector3)

    Evaluate the value of the spherical harmonics in the provided direction.

    | Improve this Doc View Source

    Constructors


    SphericalHarmonics(Int32)

    Initializes a new instance of the SphericalHarmonics<TDataType> class.

    protected SphericalHarmonics(int order)
    Parameters
    Type Name Description
    System.Int32 order

    The order of the harmonics

    | Improve this Doc View Source

    Fields


    MaximumOrder

    The maximum order supported.

    public const int MaximumOrder = 5
    Field Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    Properties


    Coefficients

    Get the coefficients defining the spherical harmonics (the spherical coordinates x{l,m} multiplying the spherical base Y{l,m}).

    [DataMember(1)]
    public TDataType[] Coefficients { get; }
    Property Value
    Type Description
    TDataType[]

    Item[Int32, Int32]

    Returns the coefficient x{l,m} of the spherical harmonics (the {l,m} spherical coordinate corresponding to the spherical base Y{l,m}).

    public TDataType this[int l, int m] { get; set; }
    Parameters
    Type Name Description
    System.Int32 l

    the l index of the coefficient

    System.Int32 m

    the m index of the coefficient

    Property Value
    Type Description
    TDataType

    the value of the coefficient


    Order

    The order of calculation of the spherical harmonic.

    [DataMember(0)]
    public int Order { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    Methods


    Evaluate(Vector3)

    Evaluate the value of the spherical harmonics in the provided direction.

    public abstract TDataType Evaluate(Vector3 direction)
    Parameters
    Type Name Description
    Vector3 direction

    The direction

    Returns
    Type Description
    TDataType

    The value of the spherical harmonics in the direction


    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