Method DistanceTo
- Namespace
- GeometryHelper.Spatial
- Assembly
- GeometryHelper.dll
DistanceTo(GeoPoint3)
Calculates the shortest distance from the mesh to a point, using the default tolerance.
public double DistanceTo(GeoPoint3 point)
Parameters
pointGeoPoint3
Returns
DistanceTo(GeoPoint3, Tolerance)
Calculates the shortest distance from the mesh to a point, within a tolerance.
public double DistanceTo(GeoPoint3 point, Tolerance tolerance)
Parameters
Returns
DistanceTo(GeoBvh3)
Calculates the shortest distance between this mesh and another, using the default tolerance.
public double DistanceTo(GeoBvh3 other)
Parameters
otherGeoBvh3
Returns
DistanceTo(GeoBvh3, Tolerance)
Calculates the shortest distance between this mesh and another, within a tolerance.
public double DistanceTo(GeoBvh3 other, Tolerance tolerance)
Parameters
Returns
Remarks
Both trees are walked at once. A pair of boxes already farther apart than the closest pair of triangles found so far cannot hold a nearer pair, so the whole cross product beneath them is discarded without being looked at. That is what turns a comparison of every triangle against every other into something usable on a real mesh.
Two meshes that touch or pass through each other are at distance zero. An empty tree is infinitely far from everything, since it has nothing to measure to.