Microsoft DirectX 9.0 SDK Update (October 2004)

PrtEngine.SetMeshMaterials Method

Language:

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

Sets mesh material properties in the 3-D scene. Use this method to specify subsurface scattering parameters.

Definition

Visual Basic .NET Public Sub SetMeshMaterials( _
    ByVal materials() As SphericalHarmonicMaterial, _
    ByVal numberChannels As Integer, _
    ByVal setAlbedo As Boolean, _
    ByVal lengthScale As Single _
)
C# public void SetMeshMaterials(
    SphericalHarmonicMaterial[] materials,
    int numberChannels,
    bool setAlbedo,
    float lengthScale
);
Managed C++ public: void SetMeshMaterials(
    SphericalHarmonicMaterial materials __gc[],
    int numberChannels,
    bool setAlbedo,
    float lengthScale
);
JScript .NET public function SetMeshMaterials(
    materials : SphericalHarmonicMaterial[],
    numberChannels : int,
    setAlbedo : boolean,
    lengthScale : float
);

Parameters

materials Microsoft.DirectX.Direct3D.SphericalHarmonicMaterial[]. An array of SphericalHarmonicMaterial structures that contain the mesh material properties to set.
numberChannels System.Int32. Number of color channels to set in the mesh. Set to 1 to specify gray materials (R = G = B), or 3 to enable color bleeding effects. If you intend to change this parameter, first set the albedo using another method such as PrtEngine.SetPerTexelAlbedo or PrtEngine.SetPerVertexAlbedo.
setAlbedo System.Boolean. Set to true to set the albedo of the mesh to materials, overwriting all existing texel and vertex albedo values. Set to false to preserve all existing texel and vertex albedo values set by other methods; numberChannels must match the numberChannels parameter of the PrtBuffer constructor used to create the buffer.
lengthScale System.Single. Scale of the 3-D scene relative to a 1 mm cube. Used for subsurface scattering computations.

Remarks

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.


© 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