| MeshHelperCreateSubmesh Method (GraphicsDevice, ITriangleMesh, Single) |
Creates a submesh to draw a triangle mesh.
Namespace: DigitalRune.GraphicsAssembly: 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
)
Public Shared Function CreateSubmesh (
graphicsDevice As GraphicsDevice,
mesh As ITriangleMesh,
angleLimit As Single
) As Submesh
public:
static Submesh^ CreateSubmesh(
GraphicsDevice^ graphicsDevice,
ITriangleMesh^ mesh,
float angleLimit
)
static member CreateSubmesh :
graphicsDevice : GraphicsDevice *
mesh : ITriangleMesh *
angleLimit : float32 -> Submesh
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:
SubmeshThe submesh, or
if the mesh is empty.
Exceptions 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