Click or drag to resize
DigitalRuneMeshHelperCreateSubmesh Method (GraphicsDevice, ITriangleMesh, Single)
Creates a submesh to draw a triangle mesh.

Namespace: DigitalRune.Graphics
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public static Submesh CreateSubmesh(
	GraphicsDevice graphicsDevice,
	ITriangleMesh mesh,
	float angleLimit
)

Parameters

graphicsDevice
Type: GraphicsDevice
The graphics device.
mesh
Type: DigitalRune.Geometry.MeshesITriangleMesh
The mesh.
angleLimit
Type: SystemSingle
The angle limit for normal vectors in radians. Normals are only merged if the angle between the triangle normals is equal to or less than the angle limit. Set this value to -1 to disable the angle limit (all normals of one vertex are merged).

Return Value

Type: Submesh
The submesh, or if the mesh is empty.
Exceptions
ExceptionCondition
ArgumentNullExceptiongraphicsDevice or mesh is .
Remarks
The returned submesh will contain a triangle list that represents the given mesh. Each vertex contains the position and the normal vector (no texture coordinates, no vertex colors, etc.). The submesh will not use an index buffer.
See Also