Microsoft DirectX 9.0 SDK Update (October 2004)

PrtEngine.ComputeVolumeSamplesDirectSphericalHarmonics Method

Language:

Note: This documentation is preliminary and is subject to change.

Computes a projection of distant lighting into spherical harmonic (SH) basis vectors that represent incident radiance at specified locations.

Definition

Visual Basic .NET Public Sub ComputeVolumeSamplesDirectSphericalHarmonics( _
    ByVal shOrderIn As Integer, _
    ByVal shOrder As Integer, _
    ByVal sampleLocations() As Vector3, _
    ByVal dataOut As PrtBuffer _
)
C# public void ComputeVolumeSamplesDirectSphericalHarmonics(
    int shOrderIn,
    int shOrder,
    Vector3[] sampleLocations,
    PrtBuffer dataOut
);
Managed C++ public: void ComputeVolumeSamplesDirectSphericalHarmonics(
    int shOrderIn,
    int shOrder,
    Vector3 sampleLocations __gc[],
    PrtBuffer *dataOut
);
JScript .NET public function ComputeVolumeSamplesDirectSphericalHarmonics(
    shOrderIn : int,
    shOrder : int,
    sampleLocations : Vector3[],
    dataOut : PrtBuffer
);

Parameters

shOrderIn System.Int32. Order of the spherical harmonic (SH) representation of distant lighting. Must be in the range of SphericalHarmonics.MinimumOrder to SphericalHarmonics.MaximumOrder, inclusive. The degree of the evaluation is shOrderIn - 1.
shOrder System.Int32. Order of the spherical harmonic (SH) representation of local lighting. Must be in the range of SphericalHarmonics.MinimumOrder to SphericalHarmonics.MaximumOrder, inclusive. The degree of the evaluation is shOrder - 1.
sampleLocations Microsoft.DirectX.Vector3[]. An integer array that contains the position for each sample.
dataOut Microsoft.DirectX.Direct3D.PrtBuffer. A PrtBuffer object that projects the distant lighting into spherical harmonic (SH) basis vectors. This buffer must have the proper number of color channels allocated for the simulation. This method generates shOrderIn2 * shOrder2 scalars per channel at each sample location.

Remarks

This method computes how light from a distant source arrives at each point in space specified by sampleLocations. The spherical harmonic (SH) coefficients represent the mapping, at each sampleLocations point, of source radiance to transferred incident radiance.

To use this method successfully, you must set sampling over a sphere with the parameter isUsingSphere set to true and the parameter isUsingCosine set to false in a call to PrtEngine.SetSamplingInfo, otherwise an exception is thrown.

Exceptions
InvalidCallException The method call is invalid. For example, a method's parameter might contain an invalid value.
OutOfMemoryException Leave Site Microsoft® Direct3D® could not allocate sufficient memory to complete the call.

See Also


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center