Table of Contents

Method CollidesWith

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

CollidesWith(GeoLine2, GeoArc2)

Determines whether a segment touches an arc.

public static bool CollidesWith(GeoLine2 line, GeoArc2 arc)

Parameters

line GeoLine2
arc GeoArc2

Returns

bool

CollidesWith(GeoLine2, GeoArc2, Tolerance)

Determines whether a segment touches an arc, within a tolerance.

public static bool CollidesWith(GeoLine2 line, GeoArc2 arc, Tolerance tolerance)

Parameters

line GeoLine2
arc GeoArc2
tolerance Tolerance

Returns

bool

Remarks

Neither has an inside, so they collide where they cross or come within the point tolerance of each other, as two segments do. At a tolerance of a thousandth, a segment ending half a thousandth short of an arc collides with it, and one ending two thousandths short does not.

CollidesWith(GeoArc2, GeoArc2)

Determines whether an arc touches another arc.

public static bool CollidesWith(GeoArc2 first, GeoArc2 second)

Parameters

first GeoArc2
second GeoArc2

Returns

bool

CollidesWith(GeoArc2, GeoArc2, Tolerance)

Determines whether an arc touches another arc, within a tolerance.

public static bool CollidesWith(GeoArc2 first, GeoArc2 second, Tolerance tolerance)

Parameters

first GeoArc2
second GeoArc2
tolerance Tolerance

Returns

bool

Remarks

Neither has an inside, so they collide where they cross or come within the point tolerance of each other. At a tolerance of a thousandth, an arc ending half a thousandth above the top of the circle of radius 50 about the origin collides with its upper half, and one ending two thousandths above does not. They collide exactly where DistanceTo(GeoArc2, GeoArc2, Tolerance) is at most the point tolerance, also for arcs of a radius smaller than it: two arcs of radius 0.0004 about the origin, one of them 1E-7 outside the other, collide where their spans overlap. Two arcs of one circle cross nowhere, but an overlap of them always begins and ends at an end of one, which the nearest pair weighs.

CollidesWith(GeoCircle2, GeoArc2)

Determines whether a circle touches or overlaps an arc.

public static bool CollidesWith(GeoCircle2 circle, GeoArc2 arc)

Parameters

circle GeoCircle2
arc GeoArc2

Returns

bool

CollidesWith(GeoCircle2, GeoArc2, Tolerance)

Determines whether a circle touches or overlaps an arc, within a tolerance.

public static bool CollidesWith(GeoCircle2 circle, GeoArc2 arc, Tolerance tolerance)

Parameters

circle GeoCircle2
arc GeoArc2
tolerance Tolerance

Returns

bool

Remarks

A circle is read as a filled disc, so an arc lying wholly within one collides with it, and so does one coming within the point tolerance of its rim from outside.

CollidesWith(GeoPolygon2, GeoArc2)

Determines whether a polygon touches or overlaps an arc.

public static bool CollidesWith(GeoPolygon2 poly, GeoArc2 arc)

Parameters

poly GeoPolygon2
arc GeoArc2

Returns

bool

CollidesWith(GeoPolygon2, GeoArc2, Tolerance)

Determines whether a polygon touches or overlaps an arc, within a tolerance.

public static bool CollidesWith(GeoPolygon2 poly, GeoArc2 arc, Tolerance tolerance)

Parameters

poly GeoPolygon2
arc GeoArc2
tolerance Tolerance

Returns

bool

Remarks

An arc lying wholly inside the polygon crosses none of its edges, so where it starts is asked as well. Outside, an arc coming within the point tolerance of an edge collides with it.

CollidesWith(GeoPolyline2, GeoArc2)

Determines whether a polyline touches an arc.

public static bool CollidesWith(GeoPolyline2 polyline, GeoArc2 arc)

Parameters

polyline GeoPolyline2
arc GeoArc2

Returns

bool

CollidesWith(GeoPolyline2, GeoArc2, Tolerance)

Determines whether a polyline touches an arc, within a tolerance.

public static bool CollidesWith(GeoPolyline2 polyline, GeoArc2 arc, Tolerance tolerance)

Parameters

polyline GeoPolyline2
arc GeoArc2
tolerance Tolerance

Returns

bool

Remarks

Neither has an inside, so they collide where they cross or come within the point tolerance of each other.

CollidesWith(GeoRectangle2, GeoArc2)

Determines whether a rectangle touches or overlaps an arc.

public static bool CollidesWith(GeoRectangle2 rect, GeoArc2 arc)

Parameters

rect GeoRectangle2
arc GeoArc2

Returns

bool

CollidesWith(GeoRectangle2, GeoArc2, Tolerance)

Determines whether a rectangle touches or overlaps an arc, within a tolerance.

public static bool CollidesWith(GeoRectangle2 rect, GeoArc2 arc, Tolerance tolerance)

Parameters

rect GeoRectangle2
arc GeoArc2
tolerance Tolerance

Returns

bool

CollidesWith(GeoRectangle2, GeoPolygonArc2)

Determines whether a rectangle touches or overlaps a loop that may curve.

public static bool CollidesWith(GeoRectangle2 rect, GeoPolygonArc2 loop)

Parameters

rect GeoRectangle2
loop GeoPolygonArc2

Returns

bool

CollidesWith(GeoRectangle2, GeoPolygonArc2, Tolerance)

Determines whether a rectangle touches or overlaps a loop that may curve, within a tolerance.

public static bool CollidesWith(GeoRectangle2 rect, GeoPolygonArc2 loop, Tolerance tolerance)

Parameters

rect GeoRectangle2
loop GeoPolygonArc2
tolerance Tolerance

Returns

bool

CollidesWith(GeoRectangle2, GeoPolylineArc2)

Determines whether a rectangle touches or overlaps a chain that may curve.

public static bool CollidesWith(GeoRectangle2 rect, GeoPolylineArc2 chain)

Parameters

rect GeoRectangle2
chain GeoPolylineArc2

Returns

bool

CollidesWith(GeoRectangle2, GeoPolylineArc2, Tolerance)

Determines whether a rectangle touches or overlaps a chain that may curve, within a tolerance.

public static bool CollidesWith(GeoRectangle2 rect, GeoPolylineArc2 chain, Tolerance tolerance)

Parameters

rect GeoRectangle2
chain GeoPolylineArc2
tolerance Tolerance

Returns

bool

CollidesWith(GeoLine2, GeoLine2)

Checks whether two line segments collide / intersect using default tolerance.

public static bool CollidesWith(GeoLine2 line1, GeoLine2 line2)

Parameters

line1 GeoLine2
line2 GeoLine2

Returns

bool

CollidesWith(GeoLine2, GeoLine2, Tolerance)

Checks whether two line segments collide / intersect within tolerance.

public static bool CollidesWith(GeoLine2 line1, GeoLine2 line2, Tolerance tolerance)

Parameters

line1 GeoLine2
line2 GeoLine2
tolerance Tolerance

Returns

bool

Remarks

They collide exactly where their distance is at most the point tolerance: where they truly cross, or where an end of one comes that near the other. A crossing of their lines past the ends does not count, as it does for TryIntersectWith(GeoLine2, GeoLine2, out GeoPoint2, Tolerance), which places points rather than testing for contact. The segment from the origin to (10, 0) and the one leaving (10.00135, 0.00078) at 60 degrees, 0.00156 apart at their corners, do not collide at a tolerance of a thousandth and do at two.

CollidesWith(GeoCircle2, GeoCircle2)

Checks whether two circles collide or overlap using default tolerance.

public static bool CollidesWith(GeoCircle2 c1, GeoCircle2 c2)

Parameters

c1 GeoCircle2
c2 GeoCircle2

Returns

bool

CollidesWith(GeoCircle2, GeoCircle2, Tolerance)

Checks whether two circles collide or overlap within tolerance.

public static bool CollidesWith(GeoCircle2 c1, GeoCircle2 c2, Tolerance tolerance)

Parameters

c1 GeoCircle2
c2 GeoCircle2
tolerance Tolerance

Returns

bool

CollidesWith(GeoCircle2, GeoLine2)

Checks whether a circle collides with a line segment using default tolerance.

public static bool CollidesWith(GeoCircle2 circle, GeoLine2 line)

Parameters

circle GeoCircle2
line GeoLine2

Returns

bool

CollidesWith(GeoCircle2, GeoLine2, Tolerance)

Checks whether a circle collides with a line segment within tolerance.

public static bool CollidesWith(GeoCircle2 circle, GeoLine2 line, Tolerance tolerance)

Parameters

circle GeoCircle2
line GeoLine2
tolerance Tolerance

Returns

bool

CollidesWith(GeoCircle2, GeoRectangle2)

Checks whether a circle collides with a rotated rectangle using default tolerance.

public static bool CollidesWith(GeoCircle2 circle, GeoRectangle2 rect)

Parameters

circle GeoCircle2
rect GeoRectangle2

Returns

bool

CollidesWith(GeoCircle2, GeoRectangle2, Tolerance)

Checks whether a circle collides with a rotated rectangle within tolerance.

public static bool CollidesWith(GeoCircle2 circle, GeoRectangle2 rect, Tolerance tolerance)

Parameters

circle GeoCircle2
rect GeoRectangle2
tolerance Tolerance

Returns

bool

CollidesWith(GeoCircle2, GeoPolygon2)

Checks whether a circle collides with a polygon using default tolerance.

public static bool CollidesWith(GeoCircle2 circle, GeoPolygon2 poly)

Parameters

circle GeoCircle2
poly GeoPolygon2

Returns

bool

CollidesWith(GeoCircle2, GeoPolygon2, Tolerance)

Checks whether a circle collides with a polygon within tolerance.

public static bool CollidesWith(GeoCircle2 circle, GeoPolygon2 poly, Tolerance tolerance)

Parameters

circle GeoCircle2
poly GeoPolygon2
tolerance Tolerance

Returns

bool

CollidesWith(GeoCircle2, GeoPolyline2)

Checks whether a circle collides with a polyline using default tolerance.

public static bool CollidesWith(GeoCircle2 circle, GeoPolyline2 polyline)

Parameters

circle GeoCircle2
polyline GeoPolyline2

Returns

bool

CollidesWith(GeoCircle2, GeoPolyline2, Tolerance)

Checks whether a circle collides with a polyline within tolerance.

public static bool CollidesWith(GeoCircle2 circle, GeoPolyline2 polyline, Tolerance tolerance)

Parameters

circle GeoCircle2
polyline GeoPolyline2
tolerance Tolerance

Returns

bool

CollidesWith(GeoRectangle2, GeoRectangle2)

Checks whether two rotated rectangles (GeoRectangle2 OBB) collide using default tolerance.

public static bool CollidesWith(GeoRectangle2 rect1, GeoRectangle2 rect2)

Parameters

rect1 GeoRectangle2
rect2 GeoRectangle2

Returns

bool

CollidesWith(GeoRectangle2, GeoRectangle2, Tolerance)

Checks whether two rotated rectangles (GeoRectangle2 OBB) collide using the Separating Axis Theorem (SAT).

public static bool CollidesWith(GeoRectangle2 rect1, GeoRectangle2 rect2, Tolerance tolerance)

Parameters

rect1 GeoRectangle2
rect2 GeoRectangle2
tolerance Tolerance

Returns

bool

Remarks

They collide exactly where their distance is at most the point tolerance. The separating axes read the tolerance along each axis, which is up to the square root of two too wide where two corners face each other, so what they let through is measured: two squares 100 by 100 with their corners 0.00085 apart in x and in y, 0.0012 apart, do not collide at a tolerance of a thousandth.

CollidesWith(GeoRectangle2, GeoLine2)

Checks whether a rectangle collides with a line segment using default tolerance.

public static bool CollidesWith(GeoRectangle2 rect, GeoLine2 line)

Parameters

rect GeoRectangle2
line GeoLine2

Returns

bool

CollidesWith(GeoRectangle2, GeoLine2, Tolerance)

Checks whether a rectangle collides with a line segment within tolerance.

public static bool CollidesWith(GeoRectangle2 rect, GeoLine2 line, Tolerance tolerance)

Parameters

rect GeoRectangle2
line GeoLine2
tolerance Tolerance

Returns

bool

Remarks

They collide where they cross, where one holds the other, or where they come within the point tolerance of each other, edge against edge with no slack past the ends. At a tolerance of a thousandth, the segment from (40, 100.01) to (60, 100.0005) collides with the square from the origin to (100, 100), ending half a thousandth above its top, and one ending two thousandths above does not.

CollidesWith(GeoRectangle2, GeoPolygon2)

Checks whether a rectangle collides with a polygon using default tolerance.

public static bool CollidesWith(GeoRectangle2 rect, GeoPolygon2 poly)

Parameters

rect GeoRectangle2
poly GeoPolygon2

Returns

bool

CollidesWith(GeoRectangle2, GeoPolygon2, Tolerance)

Checks whether a rectangle collides with a polygon within tolerance.

public static bool CollidesWith(GeoRectangle2 rect, GeoPolygon2 poly, Tolerance tolerance)

Parameters

rect GeoRectangle2
poly GeoPolygon2
tolerance Tolerance

Returns

bool

Remarks

They collide where they cross, where one holds the other, or where they come within the point tolerance of each other, edge against edge with no slack past the ends. At a tolerance of a thousandth, the segment from (40, 100.01) to (60, 100.0005) collides with the square from the origin to (100, 100), ending half a thousandth above its top, and one ending two thousandths above does not.

CollidesWith(GeoPolygon2, GeoLine2)

Checks whether a polygon collides with a line segment using default tolerance.

public static bool CollidesWith(GeoPolygon2 poly, GeoLine2 line)

Parameters

poly GeoPolygon2
line GeoLine2

Returns

bool

CollidesWith(GeoPolygon2, GeoLine2, Tolerance)

Checks whether a polygon collides with a line segment within tolerance.

public static bool CollidesWith(GeoPolygon2 poly, GeoLine2 line, Tolerance tolerance)

Parameters

poly GeoPolygon2
line GeoLine2
tolerance Tolerance

Returns

bool

Remarks

They collide where they cross, where one holds the other, or where they come within the point tolerance of each other, edge against edge with no slack past the ends. At a tolerance of a thousandth, the segment from (40, 100.01) to (60, 100.0005) collides with the square from the origin to (100, 100), ending half a thousandth above its top, and one ending two thousandths above does not.

CollidesWith(GeoPolygon2, GeoPolygon2)

Checks whether two polygons collide using default tolerance.

public static bool CollidesWith(GeoPolygon2 poly1, GeoPolygon2 poly2)

Parameters

poly1 GeoPolygon2
poly2 GeoPolygon2

Returns

bool

CollidesWith(GeoPolygon2, GeoPolygon2, Tolerance)

Checks whether two polygons collide within tolerance.

public static bool CollidesWith(GeoPolygon2 poly1, GeoPolygon2 poly2, Tolerance tolerance)

Parameters

poly1 GeoPolygon2
poly2 GeoPolygon2
tolerance Tolerance

Returns

bool

Remarks

They collide where they cross, where one holds the other, or where they come within the point tolerance of each other, edge against edge with no slack past the ends. A triangle whose corner stands 0.00156 off the corner (100, 100) of the square from the origin, its sides leaving at 60 and 31 degrees, does not collide with the square at a tolerance of a thousandth, though the line of one side crosses the line of the square's top within a thousandth of both corners; at two thousandths it does.

CollidesWith(GeoPolyline2, GeoLine2)

Checks whether a polyline collides with a line segment using default tolerance.

public static bool CollidesWith(GeoPolyline2 polyline, GeoLine2 line)

Parameters

polyline GeoPolyline2
line GeoLine2

Returns

bool

CollidesWith(GeoPolyline2, GeoLine2, Tolerance)

Checks whether a polyline collides with a line segment within tolerance.

public static bool CollidesWith(GeoPolyline2 polyline, GeoLine2 line, Tolerance tolerance)

Parameters

polyline GeoPolyline2
line GeoLine2
tolerance Tolerance

Returns

bool

Remarks

They collide where an edge and the segment cross or come within the point tolerance of each other, as two segments do. The segment from (0, 0) to (21, 0) lying over the polyline from (10, 0) to (20, 0) collides with it, though the two cross nowhere.

CollidesWith(GeoPolyline2, GeoRectangle2)

Checks whether a polyline collides with a rectangle using default tolerance.

public static bool CollidesWith(GeoPolyline2 polyline, GeoRectangle2 rect)

Parameters

polyline GeoPolyline2
rect GeoRectangle2

Returns

bool

CollidesWith(GeoPolyline2, GeoRectangle2, Tolerance)

Checks whether a polyline collides with a rectangle within tolerance.

public static bool CollidesWith(GeoPolyline2 polyline, GeoRectangle2 rect, Tolerance tolerance)

Parameters

polyline GeoPolyline2
rect GeoRectangle2
tolerance Tolerance

Returns

bool

CollidesWith(GeoPolyline2, GeoPolygon2)

Checks whether a polyline collides with a polygon using default tolerance.

public static bool CollidesWith(GeoPolyline2 polyline, GeoPolygon2 poly)

Parameters

polyline GeoPolyline2
poly GeoPolygon2

Returns

bool

CollidesWith(GeoPolyline2, GeoPolygon2, Tolerance)

Checks whether a polyline collides with a polygon within tolerance.

public static bool CollidesWith(GeoPolyline2 polyline, GeoPolygon2 poly, Tolerance tolerance)

Parameters

polyline GeoPolyline2
poly GeoPolygon2
tolerance Tolerance

Returns

bool

CollidesWith(GeoPolyline2, GeoPolyline2)

Checks whether two polylines collide using default tolerance.

public static bool CollidesWith(GeoPolyline2 pl1, GeoPolyline2 pl2)

Parameters

pl1 GeoPolyline2
pl2 GeoPolyline2

Returns

bool

CollidesWith(GeoPolyline2, GeoPolyline2, Tolerance)

Checks whether two polylines collide within tolerance.

public static bool CollidesWith(GeoPolyline2 pl1, GeoPolyline2 pl2, Tolerance tolerance)

Parameters

pl1 GeoPolyline2
pl2 GeoPolyline2
tolerance Tolerance

Returns

bool

Remarks

Neither has an inside, so they collide where they cross or come within the point tolerance of each other, edge against edge with no slack past the ends. At a tolerance of a thousandth, the polyline from (40, 100.01) to (60, 100.0005) collides with the one from (0, 100) to (100, 100), and one ending two thousandths above does not.

CollidesWith(GeoPolylineArc2, GeoLine2)

Determines whether a chain that may curve touches or overlaps a straight segment.

public static bool CollidesWith(GeoPolylineArc2 chain, GeoLine2 line)

Parameters

chain GeoPolylineArc2
line GeoLine2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolylineArc2, GeoLine2, Tolerance)

Determines whether a chain that may curve touches or overlaps a straight segment, within a tolerance.

public static bool CollidesWith(GeoPolylineArc2 chain, GeoLine2 line, Tolerance tolerance)

Parameters

chain GeoPolylineArc2
line GeoLine2
tolerance Tolerance

Returns

bool

Remarks

They collide where an edge and the segment cross or come within the point tolerance of each other, as two segments do, a curved edge read as its arc. A segment lying along a straight edge of the chain collides with it, and so does one ending half a thousandth short of a curved edge, at a tolerance of a thousandth.

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolylineArc2, GeoArc2)

Determines whether a chain that may curve touches or overlaps an arc.

public static bool CollidesWith(GeoPolylineArc2 chain, GeoArc2 arc)

Parameters

chain GeoPolylineArc2
arc GeoArc2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolylineArc2, GeoArc2, Tolerance)

Determines whether a chain that may curve touches or overlaps an arc, within a tolerance.

public static bool CollidesWith(GeoPolylineArc2 chain, GeoArc2 arc, Tolerance tolerance)

Parameters

chain GeoPolylineArc2
arc GeoArc2
tolerance Tolerance

Returns

bool

Remarks

Neither has an inside, so they collide where they cross or come within the point tolerance of each other, edge against edge, and one lying along the other collides with it: exactly where DistanceTo(GeoPolylineArc2, GeoArc2, Tolerance) is at most the tolerance. At a tolerance of a thousandth, two ends half a thousandth apart collide and two ends two thousandths apart do not.

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolylineArc2, GeoCircle2)

Determines whether a chain that may curve touches or overlaps a circle.

public static bool CollidesWith(GeoPolylineArc2 chain, GeoCircle2 circle)

Parameters

chain GeoPolylineArc2
circle GeoCircle2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolylineArc2, GeoCircle2, Tolerance)

Determines whether a chain that may curve touches or overlaps a circle, within a tolerance.

public static bool CollidesWith(GeoPolylineArc2 chain, GeoCircle2 circle, Tolerance tolerance)

Parameters

chain GeoPolylineArc2
circle GeoCircle2
tolerance Tolerance

Returns

bool

Remarks

One shape lying wholly inside the other counts, so the boundaries need not cross. Outside each other, they collide where they come within the point tolerance, edge against edge: at a tolerance of a thousandth, two boundaries half a thousandth apart collide and two thousandths apart do not.

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolylineArc2, GeoPolyline2)

Determines whether a chain that may curve touches or overlaps a straight chain.

public static bool CollidesWith(GeoPolylineArc2 chain, GeoPolyline2 polyline)

Parameters

chain GeoPolylineArc2
polyline GeoPolyline2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolylineArc2, GeoPolyline2, Tolerance)

Determines whether a chain that may curve touches or overlaps a straight chain, within a tolerance.

public static bool CollidesWith(GeoPolylineArc2 chain, GeoPolyline2 polyline, Tolerance tolerance)

Parameters

chain GeoPolylineArc2
polyline GeoPolyline2
tolerance Tolerance

Returns

bool

Remarks

Neither has an inside, so they collide where they cross or come within the point tolerance of each other, edge against edge, and one lying along the other collides with it. At a tolerance of a thousandth, two ends half a thousandth apart collide and two ends two thousandths apart do not.

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolylineArc2, GeoPolygon2)

Determines whether a chain that may curve touches or overlaps a straight loop.

public static bool CollidesWith(GeoPolylineArc2 chain, GeoPolygon2 polygon)

Parameters

chain GeoPolylineArc2
polygon GeoPolygon2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolylineArc2, GeoPolygon2, Tolerance)

Determines whether a chain that may curve touches or overlaps a straight loop, within a tolerance.

public static bool CollidesWith(GeoPolylineArc2 chain, GeoPolygon2 polygon, Tolerance tolerance)

Parameters

chain GeoPolylineArc2
polygon GeoPolygon2
tolerance Tolerance

Returns

bool

Remarks

One shape lying wholly inside the other counts, so the boundaries need not cross. Outside each other, they collide where they come within the point tolerance, edge against edge: at a tolerance of a thousandth, two boundaries half a thousandth apart collide and two thousandths apart do not.

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolylineArc2, GeoPolylineArc2)

Determines whether a chain that may curve touches or overlaps a chain that may curve.

public static bool CollidesWith(GeoPolylineArc2 chain, GeoPolylineArc2 other)

Parameters

chain GeoPolylineArc2
other GeoPolylineArc2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolylineArc2, GeoPolylineArc2, Tolerance)

Determines whether a chain that may curve touches or overlaps a chain that may curve, within a tolerance.

public static bool CollidesWith(GeoPolylineArc2 chain, GeoPolylineArc2 other, Tolerance tolerance)

Parameters

chain GeoPolylineArc2
other GeoPolylineArc2
tolerance Tolerance

Returns

bool

Remarks

Neither has an inside, so they collide where they cross or come within the point tolerance of each other, edge against edge, and one lying along the other collides with it. At a tolerance of a thousandth, two ends half a thousandth apart collide and two ends two thousandths apart do not.

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolylineArc2, GeoPolygonArc2)

Determines whether a chain that may curve touches or overlaps a loop that may curve.

public static bool CollidesWith(GeoPolylineArc2 chain, GeoPolygonArc2 loop)

Parameters

chain GeoPolylineArc2
loop GeoPolygonArc2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolylineArc2, GeoPolygonArc2, Tolerance)

Determines whether a chain that may curve touches or overlaps a loop that may curve, within a tolerance.

public static bool CollidesWith(GeoPolylineArc2 chain, GeoPolygonArc2 loop, Tolerance tolerance)

Parameters

chain GeoPolylineArc2
loop GeoPolygonArc2
tolerance Tolerance

Returns

bool

Remarks

One shape lying wholly inside the other counts, so the boundaries need not cross. Outside each other, they collide where they come within the point tolerance, edge against edge: at a tolerance of a thousandth, two boundaries half a thousandth apart collide and two thousandths apart do not.

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolygonArc2, GeoLine2)

Determines whether a loop that may curve touches or overlaps a straight segment.

public static bool CollidesWith(GeoPolygonArc2 loop, GeoLine2 line)

Parameters

loop GeoPolygonArc2
line GeoLine2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the loop is null.

CollidesWith(GeoPolygonArc2, GeoLine2, Tolerance)

Determines whether a loop that may curve touches or overlaps a straight segment, within a tolerance.

public static bool CollidesWith(GeoPolygonArc2 loop, GeoLine2 line, Tolerance tolerance)

Parameters

loop GeoPolygonArc2
line GeoLine2
tolerance Tolerance

Returns

bool

Remarks

One shape lying wholly inside the other counts, so the boundaries need not cross. Outside, they collide where an edge and the segment cross or come within the point tolerance of each other, as two segments do, a curved edge read as its arc. At a tolerance of a tenth, the segment from (101, 40) to (100.05, 60) collides with the square from the origin to (100, 100), coming within 0.05 of its right side, though its line meets the side only 1.05 past its end. Its distance stays the gap, 0.05.

Exceptions

ArgumentNullException

Thrown when the loop is null.

CollidesWith(GeoPolygonArc2, GeoArc2)

Determines whether a loop that may curve touches or overlaps an arc.

public static bool CollidesWith(GeoPolygonArc2 loop, GeoArc2 arc)

Parameters

loop GeoPolygonArc2
arc GeoArc2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the loop is null.

CollidesWith(GeoPolygonArc2, GeoArc2, Tolerance)

Determines whether a loop that may curve touches or overlaps an arc, within a tolerance.

public static bool CollidesWith(GeoPolygonArc2 loop, GeoArc2 arc, Tolerance tolerance)

Parameters

loop GeoPolygonArc2
arc GeoArc2
tolerance Tolerance

Returns

bool

Remarks

One shape lying wholly inside the other counts, so the boundaries need not cross. Outside each other, they collide where they come within the point tolerance, edge against edge: at a tolerance of a thousandth, two boundaries half a thousandth apart collide and two thousandths apart do not.

Exceptions

ArgumentNullException

Thrown when the loop is null.

CollidesWith(GeoPolygonArc2, GeoCircle2)

Determines whether a loop that may curve touches or overlaps a circle.

public static bool CollidesWith(GeoPolygonArc2 loop, GeoCircle2 circle)

Parameters

loop GeoPolygonArc2
circle GeoCircle2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the loop is null.

CollidesWith(GeoPolygonArc2, GeoCircle2, Tolerance)

Determines whether a loop that may curve touches or overlaps a circle, within a tolerance.

public static bool CollidesWith(GeoPolygonArc2 loop, GeoCircle2 circle, Tolerance tolerance)

Parameters

loop GeoPolygonArc2
circle GeoCircle2
tolerance Tolerance

Returns

bool

Remarks

One shape lying wholly inside the other counts, so the boundaries need not cross. Outside each other, they collide where they come within the point tolerance, edge against edge: at a tolerance of a thousandth, two boundaries half a thousandth apart collide and two thousandths apart do not.

Exceptions

ArgumentNullException

Thrown when the loop is null.

CollidesWith(GeoPolygonArc2, GeoPolyline2)

Determines whether a loop that may curve touches or overlaps a straight chain.

public static bool CollidesWith(GeoPolygonArc2 loop, GeoPolyline2 polyline)

Parameters

loop GeoPolygonArc2
polyline GeoPolyline2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the loop is null.

CollidesWith(GeoPolygonArc2, GeoPolyline2, Tolerance)

Determines whether a loop that may curve touches or overlaps a straight chain, within a tolerance.

public static bool CollidesWith(GeoPolygonArc2 loop, GeoPolyline2 polyline, Tolerance tolerance)

Parameters

loop GeoPolygonArc2
polyline GeoPolyline2
tolerance Tolerance

Returns

bool

Remarks

One shape lying wholly inside the other counts, so the boundaries need not cross. Outside each other, they collide where they come within the point tolerance, edge against edge: at a tolerance of a thousandth, two boundaries half a thousandth apart collide and two thousandths apart do not.

Exceptions

ArgumentNullException

Thrown when the loop is null.

CollidesWith(GeoPolygonArc2, GeoPolygon2)

Determines whether a loop that may curve touches or overlaps a straight loop.

public static bool CollidesWith(GeoPolygonArc2 loop, GeoPolygon2 polygon)

Parameters

loop GeoPolygonArc2
polygon GeoPolygon2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the loop is null.

CollidesWith(GeoPolygonArc2, GeoPolygon2, Tolerance)

Determines whether a loop that may curve touches or overlaps a straight loop, within a tolerance.

public static bool CollidesWith(GeoPolygonArc2 loop, GeoPolygon2 polygon, Tolerance tolerance)

Parameters

loop GeoPolygonArc2
polygon GeoPolygon2
tolerance Tolerance

Returns

bool

Remarks

One shape lying wholly inside the other counts, so the boundaries need not cross. Outside each other, they collide where they come within the point tolerance, edge against edge: at a tolerance of a thousandth, two boundaries half a thousandth apart collide and two thousandths apart do not.

Exceptions

ArgumentNullException

Thrown when the loop is null.

CollidesWith(GeoPolygonArc2, GeoPolylineArc2)

Determines whether a loop that may curve touches or overlaps a chain that may curve.

public static bool CollidesWith(GeoPolygonArc2 loop, GeoPolylineArc2 chain)

Parameters

loop GeoPolygonArc2
chain GeoPolylineArc2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the loop is null.

CollidesWith(GeoPolygonArc2, GeoPolylineArc2, Tolerance)

Determines whether a loop that may curve touches or overlaps a chain that may curve, within a tolerance.

public static bool CollidesWith(GeoPolygonArc2 loop, GeoPolylineArc2 chain, Tolerance tolerance)

Parameters

loop GeoPolygonArc2
chain GeoPolylineArc2
tolerance Tolerance

Returns

bool

Remarks

One shape lying wholly inside the other counts, so the boundaries need not cross. Outside each other, they collide where they come within the point tolerance, edge against edge: at a tolerance of a thousandth, two boundaries half a thousandth apart collide and two thousandths apart do not.

Exceptions

ArgumentNullException

Thrown when the loop is null.

CollidesWith(GeoPolygonArc2, GeoPolygonArc2)

Determines whether a loop that may curve touches or overlaps a loop that may curve.

public static bool CollidesWith(GeoPolygonArc2 loop, GeoPolygonArc2 other)

Parameters

loop GeoPolygonArc2
other GeoPolygonArc2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the loop is null.

CollidesWith(GeoPolygonArc2, GeoPolygonArc2, Tolerance)

Determines whether a loop that may curve touches or overlaps a loop that may curve, within a tolerance.

public static bool CollidesWith(GeoPolygonArc2 loop, GeoPolygonArc2 other, Tolerance tolerance)

Parameters

loop GeoPolygonArc2
other GeoPolygonArc2
tolerance Tolerance

Returns

bool

Remarks

One shape lying wholly inside the other counts, so the boundaries need not cross. Outside each other, they collide where they come within the point tolerance, edge against edge: at a tolerance of a thousandth, two boundaries half a thousandth apart collide and two thousandths apart do not.

Exceptions

ArgumentNullException

Thrown when the loop is null.

CollidesWith(GeoRay2, GeoArc2)

Checks whether a ray touches an arc, using the default tolerance.

public static bool CollidesWith(GeoRay2 ray, GeoArc2 arc)

Parameters

ray GeoRay2
arc GeoArc2

Returns

bool

CollidesWith(GeoRay2, GeoArc2, Tolerance)

Checks whether a ray touches an arc, within a tolerance.

public static bool CollidesWith(GeoRay2 ray, GeoArc2 arc, Tolerance tolerance)

Parameters

ray GeoRay2
arc GeoArc2
tolerance Tolerance

Returns

bool

CollidesWith(GeoCircle2, GeoRay2)

Checks whether a ray starts inside a circle or runs into it, using the default tolerance.

public static bool CollidesWith(GeoCircle2 circle, GeoRay2 ray)

Parameters

circle GeoCircle2
ray GeoRay2

Returns

bool

CollidesWith(GeoCircle2, GeoRay2, Tolerance)

Checks whether a ray starts inside a circle or runs into it, within a tolerance.

public static bool CollidesWith(GeoCircle2 circle, GeoRay2 ray, Tolerance tolerance)

Parameters

circle GeoCircle2
ray GeoRay2
tolerance Tolerance

Returns

bool

CollidesWith(GeoPolygon2, GeoRay2)

Checks whether a ray starts inside a polygon or runs into it, using the default tolerance.

public static bool CollidesWith(GeoPolygon2 poly, GeoRay2 ray)

Parameters

poly GeoPolygon2
ray GeoRay2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the polygon is null.

CollidesWith(GeoPolygon2, GeoRay2, Tolerance)

Checks whether a ray starts inside a polygon, runs into it, or passes within the point tolerance of it, within a tolerance.

public static bool CollidesWith(GeoPolygon2 poly, GeoRay2 ray, Tolerance tolerance)

Parameters

poly GeoPolygon2
ray GeoRay2
tolerance Tolerance

Returns

bool

Exceptions

ArgumentNullException

Thrown when the polygon is null.

CollidesWith(GeoPolygonArc2, GeoRay2)

Checks whether a ray starts inside a curved loop or runs into it, using the default tolerance.

public static bool CollidesWith(GeoPolygonArc2 loop, GeoRay2 ray)

Parameters

loop GeoPolygonArc2
ray GeoRay2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the loop is null.

CollidesWith(GeoPolygonArc2, GeoRay2, Tolerance)

Checks whether a ray starts inside a curved loop or runs into it, within a tolerance.

public static bool CollidesWith(GeoPolygonArc2 loop, GeoRay2 ray, Tolerance tolerance)

Parameters

loop GeoPolygonArc2
ray GeoRay2
tolerance Tolerance

Returns

bool

Exceptions

ArgumentNullException

Thrown when the loop is null.

CollidesWith(GeoPolyline2, GeoRay2)

Checks whether a ray touches a polyline, using the default tolerance.

public static bool CollidesWith(GeoPolyline2 polyline, GeoRay2 ray)

Parameters

polyline GeoPolyline2
ray GeoRay2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the polyline is null.

CollidesWith(GeoPolyline2, GeoRay2, Tolerance)

Checks whether a ray touches a polyline, within a tolerance.

public static bool CollidesWith(GeoPolyline2 polyline, GeoRay2 ray, Tolerance tolerance)

Parameters

polyline GeoPolyline2
ray GeoRay2
tolerance Tolerance

Returns

bool

Exceptions

ArgumentNullException

Thrown when the polyline is null.

CollidesWith(GeoPolylineArc2, GeoRay2)

Checks whether a ray touches a curved chain, using the default tolerance.

public static bool CollidesWith(GeoPolylineArc2 chain, GeoRay2 ray)

Parameters

chain GeoPolylineArc2
ray GeoRay2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolylineArc2, GeoRay2, Tolerance)

Checks whether a ray touches a curved chain, within a tolerance.

public static bool CollidesWith(GeoPolylineArc2 chain, GeoRay2 ray, Tolerance tolerance)

Parameters

chain GeoPolylineArc2
ray GeoRay2
tolerance Tolerance

Returns

bool

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoRectangle2, GeoRay2)

Checks whether a ray starts inside a rectangle or runs into it, using the default tolerance.

public static bool CollidesWith(GeoRectangle2 rect, GeoRay2 ray)

Parameters

rect GeoRectangle2
ray GeoRay2

Returns

bool

CollidesWith(GeoRectangle2, GeoRay2, Tolerance)

Checks whether a ray starts inside a rectangle, runs into it, or passes within the point tolerance of it, within a tolerance.

public static bool CollidesWith(GeoRectangle2 rect, GeoRay2 ray, Tolerance tolerance)

Parameters

rect GeoRectangle2
ray GeoRay2
tolerance Tolerance

Returns

bool

CollidesWith(GeoRay2, GeoLine2)

Checks whether a ray touches a line segment, using the default tolerance.

public static bool CollidesWith(GeoRay2 ray, GeoLine2 line)

Parameters

ray GeoRay2
line GeoLine2

Returns

bool

CollidesWith(GeoRay2, GeoLine2, Tolerance)

Checks whether a ray touches a line segment, within a tolerance.

public static bool CollidesWith(GeoRay2 ray, GeoLine2 line, Tolerance tolerance)

Parameters

ray GeoRay2
line GeoLine2
tolerance Tolerance

Returns

bool

Remarks

A segment lying along the ray touches it along a length and crosses it nowhere, so this is not the crossing test with the place thrown away: it is the two coming within the point tolerance of each other.

CollidesWith(GeoLine2, GeoRay2)

Checks whether a line segment touches a ray, using the default tolerance: the same answer as CollidesWith(GeoRay2, GeoLine2).

public static bool CollidesWith(GeoLine2 line, GeoRay2 ray)

Parameters

line GeoLine2
ray GeoRay2

Returns

bool

CollidesWith(GeoLine2, GeoRay2, Tolerance)

Checks whether a line segment touches a ray, within a tolerance: the same answer as CollidesWith(GeoRay2, GeoLine2, Tolerance).

public static bool CollidesWith(GeoLine2 line, GeoRay2 ray, Tolerance tolerance)

Parameters

line GeoLine2
ray GeoRay2
tolerance Tolerance

Returns

bool

CollidesWith(GeoRay2, GeoRay2)

Checks whether two rays touch, using the default tolerance.

public static bool CollidesWith(GeoRay2 ray1, GeoRay2 ray2)

Parameters

ray1 GeoRay2
ray2 GeoRay2

Returns

bool

CollidesWith(GeoRay2, GeoRay2, Tolerance)

Checks whether two rays touch, within a tolerance.

public static bool CollidesWith(GeoRay2 ray1, GeoRay2 ray2, Tolerance tolerance)

Parameters

ray1 GeoRay2

The first ray.

ray2 GeoRay2

The second ray.

tolerance Tolerance

The tolerance.

Returns

bool

true when the distance between the two is at most the point tolerance; otherwise, false.

Remarks

The ray from the origin along X and the one from (50, -50) along Y cross at (50, 0); two rays along the X axis from 0 and from 100, facing each other, touch along the stretch between them; turned back to back, they touch nowhere. A crossing of the carriers behind an origin does not count: the ray from (0.0009, 0) along X and the one leaving 0.0009 along 120 degrees from the origin, their origins 0.00156 apart, do not touch at a tolerance of a thousandth.