SphericalHarmonics.Add(Single[],Int32,Single[],Single[]) Method (Microsoft.DirectX.Direct3D)

Adds two spherical harmonic (SH) vectors together; in other words, Out[i] = A[i] + B[i].

Definition

Visual Basic Public Shared Sub Add( _
    ByVal output() As Single, _
    ByVal order As Integer, _
    ByVal vectorA() As Single, _
    ByVal vectorB() As Single _
)
C# public static void Add(
    float[] output,
    int order,
    float[] vectorA,
    float[] vectorB
);
C++ public:
static void Add(
    array<float>^ output,
    int order,
    array<float>^ vectorA,
    array<float>^ vectorB
);
JScript public static function Add(
    output : float[],
    order : int,
    vectorA : float[],
    vectorB : float[]
);

Parameters

output System.Single[]
An array of floating point values that represent the output coefficients.
order System.Int32
Order of the SH evaluation. Must be in the range of SphericalHarmonics.MinimumOrder to SphericalHarmonics.MaximumOrder, inclusive. The evaluation generates order2 coefficients. The degree of the evaluation is order - 1.
vectorA System.Single[]
An array of floating point values that represent the first SH vector to add to the second vector.
vectorB System.Single[]
An array of floating point values that represent the second SH vector to add to the first vector.

Remarks

Each coefficient of the basis function Ylm is stored at location l2 + m + l, where:

  • l is the degree of the basis function.
  • m is the basis function index for the given l value and ranges from -l to l, inclusive.