Table of Contents

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

point GeoPoint3

Returns

double

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

other GeoAabb3

Returns

double

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

polyline GeoPolyline3

Returns

double

DistanceTo(GeoPolyline3, Tolerance)

Gets the distance from this box to a polyline, within a tolerance.

public double DistanceTo(GeoPolyline3 polyline, Tolerance tolerance)

Parameters

polyline GeoPolyline3
tolerance Tolerance

Returns

double

DistanceTo(GeoSolid3)

Gets the distance from this box to a solid, using the default tolerance.

public double DistanceTo(GeoSolid3 solid)

Parameters

solid GeoSolid3

Returns

double

DistanceTo(GeoSolid3, Tolerance)

Gets the distance from this box to a solid, within a tolerance.

public double DistanceTo(GeoSolid3 solid, Tolerance tolerance)

Parameters

solid GeoSolid3
tolerance Tolerance

Returns

double