ShapeGetMesh Method |
Namespace: DigitalRune.Geometry.Shapes
Exception | Condition |
---|---|
ArgumentOutOfRangeException | relativeDistanceThreshold is negative. |
ArgumentOutOfRangeException | iterationLimit is negative or 0. |
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.