SphericalHarmonics<TDataType> Class
Namespace: Stride.Core.MathematicsAssembly: Stride.Core.Mathematics.dll
A representation of a sphere of values via Spherical Harmonics (SH).
[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. |
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 |
Fields
MaximumOrder
The maximum order supported.
public const int MaximumOrder = 5
Field Value
Type | Description |
---|---|
System.Int32 |
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 |
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 |