PrtEngine.SetMeshMaterials Method |
Language: |
Sets mesh material properties in the 3-D scene. Use this method to specify subsurface scattering parameters.
Visual Basic 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
);C++ public:
void SetMeshMaterials(
array<SphericalHarmonicMaterial>^ materials,
int numberChannels,
bool setAlbedo,
float lengthScale
);JScript public function SetMeshMaterials(
materials : SphericalHarmonicMaterial[],
numberChannels : int,
setAlbedo : boolean,
lengthScale : float
);
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.
Exceptions
InvalidCallException The method call is invalid. For example, a method's parameter might contain an invalid value. OutOfMemoryException Microsoft Direct3D could not allocate sufficient memory to complete the call.
Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center