| GeometryHelperCreateConvexHull Method (IEnumerableVector3F, Int32, Single) |
Creates a convex hull mesh for a set of points.
Namespace: DigitalRune.GeometryAssembly: DigitalRune.Geometry (in DigitalRune.Geometry.dll) Version: 1.18.0.0 (1.18.2.14427)
Syntax public static DcelMesh CreateConvexHull(
IEnumerable<Vector3F> points,
int vertexLimit,
float skinWidth
)
Public Shared Function CreateConvexHull (
points As IEnumerable(Of Vector3F),
vertexLimit As Integer,
skinWidth As Single
) As DcelMesh
public:
static DcelMesh^ CreateConvexHull(
IEnumerable<Vector3F>^ points,
int vertexLimit,
float skinWidth
)
static member CreateConvexHull :
points : IEnumerable<Vector3F> *
vertexLimit : int *
skinWidth : float32 -> DcelMesh
Parameters
- points
- Type: System.Collections.GenericIEnumerableVector3F
The points. - vertexLimit
- Type: SystemInt32
The vertex limit. Must be greater than 0. Common values are 32 or 64.
- skinWidth
- Type: SystemSingle
The skin width. Common values are 0.01 or 0.001.
Return Value
Type:
DcelMesh
The mesh of the convex hull or
if the point list is
or empty.
Remarks
The returned mesh describes the convex hull. All faces are convex polygons.
If the created convex hull has more vertices than vertexLimit, the hull
will be simplified. The simplified hull is conservative, which means it contains all given
points and is less "tight" than the exact hull. It is possible that the
simplified hull contains slightly more vertices than vertexLimit (e.g. it
is possible that for a vertex limit of 32 a hull with 34 vertices is returned).
All planes of the convex hull are extruded by the skinWidth. This can be
used to increase or decrease the size of the convex hull.
See Also