Class SphericalHarmonics<TDataType>
- Namespace
 - Stride.Core.Mathematics
 
- Assembly
 - Stride.Core.Mathematics.dll
 
A representation of a sphere of values via Spherical Harmonics (SH).
[DataContract("SphericalHarmonicsGeneric")]
public abstract class SphericalHarmonics<TDataType>
  Type Parameters
TDataTypeThe type of data contained by the sphere
- Inheritance
 - 
      objectSphericalHarmonics<TDataType>
 
- Derived
 
Constructors
SphericalHarmonics(int)
Initializes a new instance of the SphericalHarmonics<TDataType> class.
protected SphericalHarmonics(int order)
  Parameters
orderintThe order of the harmonics
Fields
MaximumOrder
The maximum order supported.
public const int MaximumOrder = 5
  Field Value
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
- TDataType[]
 
this[int, int]
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
Property Value
- TDataType
 the value of the coefficient
Order
The order of calculation of the spherical harmonic.
[DataMember(0)]
public int Order { get; }
  Property Value
Methods
Evaluate(Vector3)
Evaluate the value of the spherical harmonics in the provided direction.
public abstract TDataType Evaluate(Vector3 direction)
  Parameters
directionVector3The direction
Returns
- TDataType
 The value of the spherical harmonics in the direction