Expand Minimize

D3DXSHMultiply2 function

Computes the product of two functions represented using SH (f and g).

Syntax


FLOAT* D3DXSHMultiply2(
  _In_  FLOAT *pOut,
  _In_  const FLOAT *pF,
  _In_  const FLOAT *pG
);

Parameters

pOut [in]

Type: FLOAT*

Pointer to the output SH coefficients - basis function Ylm is stored at l*l + m+l.

pF [in]

Type: const FLOAT*

Input SH coeffs for first function.

pG [in]

Type: const FLOAT*

Second set of input SH coeffs.

Return value

Type: FLOAT*

Pointer to SH output coefficients.

Remarks

The order is a number between 2 and 6 inclusive. So this page actually documents several functions: D3DXSHMultiply2, D3DXSHMultiply3, ... D3DXSHMultiply6.

Computes the product of two functions represented using SH (f and g), where pOut[i] = int(y_i(s) * f(s) * g(s)), where y_i(s) is the ith SH basis function, f(s) and g(s) are SH functions (sum_i(y_i(s)*c_i)). The order O determines the lengths of the arrays, where there should always be O^2 coefficients. In general the product of two SH functions of order O generates an SH function of order 2*O - 1, but the results are truncated. This means that the product commutes (f*g == g*f) but doesn't associate (f*(g*h) != (f*g)*h.

Requirements

Header

D3dx9math.h

See also

Math Functions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft