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
Returns
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
Returns
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
Returns
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
Returns
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
circleGeoCircle2arcGeoArc2
Returns
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
circleGeoCircle2arcGeoArc2toleranceTolerance
Returns
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
polyGeoPolygon2arcGeoArc2
Returns
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
polyGeoPolygon2arcGeoArc2toleranceTolerance
Returns
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
polylineGeoPolyline2arcGeoArc2
Returns
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
polylineGeoPolyline2arcGeoArc2toleranceTolerance
Returns
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
rectGeoRectangle2arcGeoArc2
Returns
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
rectGeoRectangle2arcGeoArc2toleranceTolerance
Returns
CollidesWith(GeoRectangle2, GeoPolygonArc2)
Determines whether a rectangle touches or overlaps a loop that may curve.
public static bool CollidesWith(GeoRectangle2 rect, GeoPolygonArc2 loop)
Parameters
rectGeoRectangle2loopGeoPolygonArc2
Returns
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
rectGeoRectangle2loopGeoPolygonArc2toleranceTolerance
Returns
CollidesWith(GeoRectangle2, GeoPolylineArc2)
Determines whether a rectangle touches or overlaps a chain that may curve.
public static bool CollidesWith(GeoRectangle2 rect, GeoPolylineArc2 chain)
Parameters
rectGeoRectangle2chainGeoPolylineArc2
Returns
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
rectGeoRectangle2chainGeoPolylineArc2toleranceTolerance
Returns
CollidesWith(GeoLine2, GeoLine2)
Checks whether two line segments collide / intersect using default tolerance.
public static bool CollidesWith(GeoLine2 line1, GeoLine2 line2)
Parameters
Returns
CollidesWith(GeoLine2, GeoLine2, Tolerance)
Checks whether two line segments collide / intersect within tolerance.
public static bool CollidesWith(GeoLine2 line1, GeoLine2 line2, Tolerance tolerance)
Parameters
Returns
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
c1GeoCircle2c2GeoCircle2
Returns
CollidesWith(GeoCircle2, GeoCircle2, Tolerance)
Checks whether two circles collide or overlap within tolerance.
public static bool CollidesWith(GeoCircle2 c1, GeoCircle2 c2, Tolerance tolerance)
Parameters
c1GeoCircle2c2GeoCircle2toleranceTolerance
Returns
CollidesWith(GeoCircle2, GeoLine2)
Checks whether a circle collides with a line segment using default tolerance.
public static bool CollidesWith(GeoCircle2 circle, GeoLine2 line)
Parameters
circleGeoCircle2lineGeoLine2
Returns
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
circleGeoCircle2lineGeoLine2toleranceTolerance
Returns
CollidesWith(GeoCircle2, GeoRectangle2)
Checks whether a circle collides with a rotated rectangle using default tolerance.
public static bool CollidesWith(GeoCircle2 circle, GeoRectangle2 rect)
Parameters
circleGeoCircle2rectGeoRectangle2
Returns
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
circleGeoCircle2rectGeoRectangle2toleranceTolerance
Returns
CollidesWith(GeoCircle2, GeoPolygon2)
Checks whether a circle collides with a polygon using default tolerance.
public static bool CollidesWith(GeoCircle2 circle, GeoPolygon2 poly)
Parameters
circleGeoCircle2polyGeoPolygon2
Returns
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
circleGeoCircle2polyGeoPolygon2toleranceTolerance
Returns
CollidesWith(GeoCircle2, GeoPolyline2)
Checks whether a circle collides with a polyline using default tolerance.
public static bool CollidesWith(GeoCircle2 circle, GeoPolyline2 polyline)
Parameters
circleGeoCircle2polylineGeoPolyline2
Returns
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
circleGeoCircle2polylineGeoPolyline2toleranceTolerance
Returns
CollidesWith(GeoRectangle2, GeoRectangle2)
Checks whether two rotated rectangles (GeoRectangle2 OBB) collide using default tolerance.
public static bool CollidesWith(GeoRectangle2 rect1, GeoRectangle2 rect2)
Parameters
rect1GeoRectangle2rect2GeoRectangle2
Returns
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
rect1GeoRectangle2rect2GeoRectangle2toleranceTolerance
Returns
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
rectGeoRectangle2lineGeoLine2
Returns
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
rectGeoRectangle2lineGeoLine2toleranceTolerance
Returns
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
rectGeoRectangle2polyGeoPolygon2
Returns
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
rectGeoRectangle2polyGeoPolygon2toleranceTolerance
Returns
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
polyGeoPolygon2lineGeoLine2
Returns
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
polyGeoPolygon2lineGeoLine2toleranceTolerance
Returns
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
poly1GeoPolygon2poly2GeoPolygon2
Returns
CollidesWith(GeoPolygon2, GeoPolygon2, Tolerance)
Checks whether two polygons collide within tolerance.
public static bool CollidesWith(GeoPolygon2 poly1, GeoPolygon2 poly2, Tolerance tolerance)
Parameters
poly1GeoPolygon2poly2GeoPolygon2toleranceTolerance
Returns
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
polylineGeoPolyline2lineGeoLine2
Returns
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
polylineGeoPolyline2lineGeoLine2toleranceTolerance
Returns
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
polylineGeoPolyline2rectGeoRectangle2
Returns
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
polylineGeoPolyline2rectGeoRectangle2toleranceTolerance
Returns
CollidesWith(GeoPolyline2, GeoPolygon2)
Checks whether a polyline collides with a polygon using default tolerance.
public static bool CollidesWith(GeoPolyline2 polyline, GeoPolygon2 poly)
Parameters
polylineGeoPolyline2polyGeoPolygon2
Returns
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
polylineGeoPolyline2polyGeoPolygon2toleranceTolerance
Returns
CollidesWith(GeoPolyline2, GeoPolyline2)
Checks whether two polylines collide using default tolerance.
public static bool CollidesWith(GeoPolyline2 pl1, GeoPolyline2 pl2)
Parameters
pl1GeoPolyline2pl2GeoPolyline2
Returns
CollidesWith(GeoPolyline2, GeoPolyline2, Tolerance)
Checks whether two polylines collide within tolerance.
public static bool CollidesWith(GeoPolyline2 pl1, GeoPolyline2 pl2, Tolerance tolerance)
Parameters
pl1GeoPolyline2pl2GeoPolyline2toleranceTolerance
Returns
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
chainGeoPolylineArc2lineGeoLine2
Returns
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
chainGeoPolylineArc2lineGeoLine2toleranceTolerance
Returns
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
chainGeoPolylineArc2arcGeoArc2
Returns
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
chainGeoPolylineArc2arcGeoArc2toleranceTolerance
Returns
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
chainGeoPolylineArc2circleGeoCircle2
Returns
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
chainGeoPolylineArc2circleGeoCircle2toleranceTolerance
Returns
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
chainGeoPolylineArc2polylineGeoPolyline2
Returns
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
chainGeoPolylineArc2polylineGeoPolyline2toleranceTolerance
Returns
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
chainGeoPolylineArc2polygonGeoPolygon2
Returns
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
chainGeoPolylineArc2polygonGeoPolygon2toleranceTolerance
Returns
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
chainGeoPolylineArc2otherGeoPolylineArc2
Returns
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
chainGeoPolylineArc2otherGeoPolylineArc2toleranceTolerance
Returns
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
chainGeoPolylineArc2loopGeoPolygonArc2
Returns
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
chainGeoPolylineArc2loopGeoPolygonArc2toleranceTolerance
Returns
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
loopGeoPolygonArc2lineGeoLine2
Returns
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
loopGeoPolygonArc2lineGeoLine2toleranceTolerance
Returns
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
loopGeoPolygonArc2arcGeoArc2
Returns
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
loopGeoPolygonArc2arcGeoArc2toleranceTolerance
Returns
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
loopGeoPolygonArc2circleGeoCircle2
Returns
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
loopGeoPolygonArc2circleGeoCircle2toleranceTolerance
Returns
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
loopGeoPolygonArc2polylineGeoPolyline2
Returns
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
loopGeoPolygonArc2polylineGeoPolyline2toleranceTolerance
Returns
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
loopGeoPolygonArc2polygonGeoPolygon2
Returns
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
loopGeoPolygonArc2polygonGeoPolygon2toleranceTolerance
Returns
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
loopGeoPolygonArc2chainGeoPolylineArc2
Returns
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
loopGeoPolygonArc2chainGeoPolylineArc2toleranceTolerance
Returns
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
loopGeoPolygonArc2otherGeoPolygonArc2
Returns
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
loopGeoPolygonArc2otherGeoPolygonArc2toleranceTolerance
Returns
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
Returns
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
Returns
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
circleGeoCircle2rayGeoRay2
Returns
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
circleGeoCircle2rayGeoRay2toleranceTolerance
Returns
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
polyGeoPolygon2rayGeoRay2
Returns
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
polyGeoPolygon2rayGeoRay2toleranceTolerance
Returns
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
loopGeoPolygonArc2rayGeoRay2
Returns
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
loopGeoPolygonArc2rayGeoRay2toleranceTolerance
Returns
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
polylineGeoPolyline2rayGeoRay2
Returns
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
polylineGeoPolyline2rayGeoRay2toleranceTolerance
Returns
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
chainGeoPolylineArc2rayGeoRay2
Returns
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
chainGeoPolylineArc2rayGeoRay2toleranceTolerance
Returns
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
rectGeoRectangle2rayGeoRay2
Returns
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
rectGeoRectangle2rayGeoRay2toleranceTolerance
Returns
CollidesWith(GeoRay2, GeoLine2)
Checks whether a ray touches a line segment, using the default tolerance.
public static bool CollidesWith(GeoRay2 ray, GeoLine2 line)
Parameters
Returns
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
Returns
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
Returns
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
Returns
CollidesWith(GeoRay2, GeoRay2)
Checks whether two rays touch, using the default tolerance.
public static bool CollidesWith(GeoRay2 ray1, GeoRay2 ray2)
Parameters
Returns
CollidesWith(GeoRay2, GeoRay2, Tolerance)
Checks whether two rays touch, within a tolerance.
public static bool CollidesWith(GeoRay2 ray1, GeoRay2 ray2, Tolerance tolerance)
Parameters
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.