Method GetIntersections
- Namespace
- GeometryHelper.Spatial
- Assembly
- GeometryHelper.dll
GetIntersections(GeoLine2)
Gets the points where a straight segment crosses the indexed edges.
public GeoPoint2[] GetIntersections(GeoLine2 line)
Parameters
lineGeoLine2
Returns
GetIntersections(GeoLine2, Tolerance)
Gets the points where a straight segment crosses the indexed edges, within a tolerance.
public GeoPoint2[] GetIntersections(GeoLine2 line, Tolerance tolerance)
Parameters
Returns
GetIntersections(GeoRay2)
Gets the points where a ray crosses the indexed edges.
public GeoPoint2[] GetIntersections(GeoRay2 ray)
Parameters
rayGeoRay2
Returns
GetIntersections(GeoRay2, Tolerance)
Gets the points where a ray crosses the indexed edges, within a tolerance.
public GeoPoint2[] GetIntersections(GeoRay2 ray, Tolerance tolerance)
Parameters
Returns
Remarks
Each edge is asked GetIntersections(GeoRay2, Tolerance), so the answer is the same points as the plain scan's over every edge (in tree order, and of two crossings within the tolerance of each other the one the tree meets first), whatever else is indexed: an edge that draws apart from the ray by less than the point tolerance along its own length is parallel to it, as it is with no index at all. The edge from (0, 0) to (100, 0.0005) is crossed nowhere by the ray from (-50, 0) along X at the default tolerance, with or without an edge a million away beside it. The branches whose box, grown by the point tolerance, the ray never enters are not looked at. Over the edges of the square 100 by 100 with a corner at the origin, the ray from (-50, 50) along X crosses at (0, 50) and (100, 50). An empty hierarchy is crossed nowhere.
GetIntersections(GeoXLine2)
Gets the points where an infinite line crosses the indexed edges.
public GeoPoint2[] GetIntersections(GeoXLine2 xline)
Parameters
xlineGeoXLine2
Returns
GetIntersections(GeoXLine2, Tolerance)
Gets the points where an infinite line crosses the indexed edges, within a tolerance.
public GeoPoint2[] GetIntersections(GeoXLine2 xline, Tolerance tolerance)
Parameters
Returns
Remarks
Each edge is asked GetIntersections(GeoXLine2, Tolerance), so the answer is the plain scan's over every edge, whatever else is indexed: an edge that draws apart from the line by less than the point tolerance along its own length is parallel to it, as it is with no index at all. The branches whose box, grown by the point tolerance, the infinite line never enters are not looked at, and the line runs both ways from its origin, so the answer is the same wherever on it the origin stands. Over the edges of the square 100 by 100 with a corner at the origin, the line through (500, 50) along X crosses at (0, 50) and (100, 50), which the ray from the same origin, pointing away, does not. An empty hierarchy is crossed nowhere.