Click or drag to resize
DigitalRuneDcelMeshModifyConvex Method (Int32, Single)
Modifies a convex mesh by reducing the vertices and applying a skin width.

Namespace: DigitalRune.Geometry.Meshes
Assembly: DigitalRune.Geometry (in DigitalRune.Geometry.dll) Version: 1.18.0.0 (1.18.2.14427)
Syntax
public void ModifyConvex(
	int vertexLimit,
	float skinWidth
)

Parameters

vertexLimit
Type: SystemInt32
The vertex limit.
skinWidth
Type: SystemSingle
The width of the skin.
Remarks

Prerequisites: This operation uses UserData of the vertices and it assumes that the mesh is valid, convex and closed. All faces must be triangles or convex polygons.

The number of vertices in the convex mesh is reduced to the given vertexLimit. If this operation has to remove vertices, the mesh grows to a bigger convex mesh. The method tries to remove only the vertices with the least influence.

All faces are extruded along the normal by the given skin width. The skin width causes the convex mesh to grow (positive skin width) or shrink (negative skin width). The result is again convex.

See Also