Click or drag to resize
DigitalRuneShapeGetMesh Method
Gets a mesh that represents this shape.

Namespace: DigitalRune.Geometry.Shapes
Assembly: DigitalRune.Geometry (in DigitalRune.Geometry.dll) Version: 1.18.0.0 (1.18.2.14427)
Syntax
public TriangleMesh GetMesh(
	float relativeDistanceThreshold,
	int iterationLimit
)

Parameters

relativeDistanceThreshold
Type: SystemSingle
The relative distance threshold.
iterationLimit
Type: SystemInt32
The iteration limit.

Return Value

Type: TriangleMesh
The triangle mesh for this shape.
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionrelativeDistanceThreshold is negative.
ArgumentOutOfRangeExceptioniterationLimit is negative or 0.
Remarks

If a mesh can exactly represent the shape, an exact mesh is returned (for example for a BoxShape). Otherwise a mesh with a relative error will be returned (for example for a SphereShape). The relative error is less than relativeDistanceThreshold % of the largest AABB extent. If the mesh is generated by an iterative algorithm, no more than iterationLimit iterations are performed. If the iterationLimit is reached first, the returned mesh will have a higher relative error.

This method calls OnGetMesh(Single, Int32) which must be implemented in derived classes. See OnGetMesh(Single, Int32) for more information about the generated mesh.

See Also