Click or drag to resize
DigitalRuneMeshHelperGetMaterial Method
Gets the material of a submesh.

Namespace: DigitalRune.Graphics
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public static Material GetMaterial(
	this Submesh submesh
)

Parameters

submesh
Type: DigitalRune.GraphicsSubmesh
The submesh.

Return Value

Type: Material
The material of this submesh, or if the submesh is not assigned to a mesh or if the MaterialIndex is invalid.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Submesh. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptionsubmesh is .
See Also