Method FromSolid
- Namespace
- GeometryHelper.Spatial
- Assembly
- GeometryHelper.dll
FromSolid(GeoSolid3)
Builds a hierarchy over the surface of a solid, using the default tolerance.
public static GeoBvh3 FromSolid(GeoSolid3 solid)
Parameters
solidGeoSolid3
Returns
FromSolid(GeoSolid3, Tolerance)
Builds a hierarchy over the surface of a solid, within a tolerance.
public static GeoBvh3 FromSolid(GeoSolid3 solid, Tolerance tolerance)
Parameters
solidGeoSolid3The body whose surface is indexed.
toleranceToleranceThe tolerance the surface is meshed with.
Returns
Remarks
The index is built over Triangulate(Tolerance), so it follows the material of every face: a ray fired through the notch of a concave body or through a hole in a plate passes clean through, and the nearest point on the surface is a point that is really on it.
A tree is worth building once and keeping. Nothing about it depends on what is asked of it, so
a body that is queried repeatedly — clash detection over a model — should be indexed once
rather than through the convenience paths in Collision3 and Distance3, which
build a tree per call.