Method DistanceTo
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
DistanceTo(GeoPoint3)
Calculates the shortest distance from this box to a point. A point inside is at distance zero, and an empty box is infinitely far from everything.
public double DistanceTo(GeoPoint3 point)
Parameters
pointGeoPoint3
Returns
Remarks
This is what prunes a search through a tree of boxes: a box already farther away than the best answer so far cannot hold anything nearer, so the whole branch below it can be skipped without being looked at.
DistanceTo(GeoAabb3)
Calculates the shortest distance between this box and another one. Boxes that overlap are at distance zero, and an empty box is infinitely far from everything.
public double DistanceTo(GeoAabb3 other)
Parameters
otherGeoAabb3
Returns
Remarks
The gap between two axis-aligned boxes separates on each axis independently, so the distance is the length of the vector of per-axis gaps. This is what prunes a traversal of two trees at once: a pair of boxes already farther apart than the best answer so far cannot hold a nearer pair.
DistanceTo(GeoPolyline3)
Gets the distance from this box to a polyline, using the default tolerance.
public double DistanceTo(GeoPolyline3 polyline)
Parameters
polylineGeoPolyline3
Returns
DistanceTo(GeoPolyline3, Tolerance)
Gets the distance from this box to a polyline, within a tolerance.
public double DistanceTo(GeoPolyline3 polyline, Tolerance tolerance)
Parameters
polylineGeoPolyline3toleranceTolerance
Returns
DistanceTo(GeoSolid3)
Gets the distance from this box to a solid, using the default tolerance.
public double DistanceTo(GeoSolid3 solid)
Parameters
solidGeoSolid3
Returns
DistanceTo(GeoSolid3, Tolerance)
Gets the distance from this box to a solid, within a tolerance.
public double DistanceTo(GeoSolid3 solid, Tolerance tolerance)