Table of Contents

Method CollidesWith

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

CollidesWith(GeoEllipse2, GeoLine2)

Determines whether an ellipse touches a segment, using the default tolerance.

public static bool CollidesWith(GeoEllipse2 ellipse, GeoLine2 line)

Parameters

ellipse GeoEllipse2
line GeoLine2

Returns

bool

CollidesWith(GeoEllipse2, GeoLine2, Tolerance)

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

public static bool CollidesWith(GeoEllipse2 ellipse, GeoLine2 line, Tolerance tolerance)

Parameters

ellipse GeoEllipse2

The ellipse.

line GeoLine2

The segment.

tolerance Tolerance

The tolerance.

Returns

bool

true if the segment comes within the point tolerance of the region, crossing the rim or lying inside; otherwise, false.

CollidesWith(GeoEllipse2, GeoPolyline2)

Determines whether an ellipse touches a polyline, using the default tolerance.

public static bool CollidesWith(GeoEllipse2 ellipse, GeoPolyline2 polyline)

Parameters

ellipse GeoEllipse2
polyline GeoPolyline2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the polyline is null.

CollidesWith(GeoEllipse2, GeoPolyline2, Tolerance)

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

public static bool CollidesWith(GeoEllipse2 ellipse, GeoPolyline2 polyline, Tolerance tolerance)

Parameters

ellipse GeoEllipse2

The ellipse.

polyline GeoPolyline2

The polyline.

tolerance Tolerance

The tolerance.

Returns

bool

true if any edge comes within the point tolerance of the region; otherwise, false.

Exceptions

ArgumentNullException

Thrown when the polyline is null.

CollidesWith(GeoEllipse2, GeoPolygon2)

Determines whether an ellipse touches or overlaps a polygon, using the default tolerance.

public static bool CollidesWith(GeoEllipse2 ellipse, GeoPolygon2 polygon)

Parameters

ellipse GeoEllipse2
polygon GeoPolygon2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the polygon is null.

CollidesWith(GeoEllipse2, GeoPolygon2, Tolerance)

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

public static bool CollidesWith(GeoEllipse2 ellipse, GeoPolygon2 polygon, Tolerance tolerance)

Parameters

ellipse GeoEllipse2

The ellipse.

polygon GeoPolygon2

The polygon.

tolerance Tolerance

The tolerance.

Returns

bool

true if the polygon holds the centre, or an edge comes within the point tolerance of the region; otherwise, false.

Exceptions

ArgumentNullException

Thrown when the polygon is null.

CollidesWith(GeoEllipse2, GeoRectangle2)

Determines whether an ellipse touches or overlaps a rectangle, using the default tolerance.

public static bool CollidesWith(GeoEllipse2 ellipse, GeoRectangle2 rect)

Parameters

ellipse GeoEllipse2
rect GeoRectangle2

Returns

bool

CollidesWith(GeoEllipse2, GeoRectangle2, Tolerance)

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

public static bool CollidesWith(GeoEllipse2 ellipse, GeoRectangle2 rect, Tolerance tolerance)

Parameters

ellipse GeoEllipse2

The ellipse.

rect GeoRectangle2

The rectangle.

tolerance Tolerance

The tolerance.

Returns

bool

true if the rectangle holds the centre, or a side comes within the point tolerance of the region; otherwise, false.

CollidesWith(GeoEllipse2, GeoTriangle2)

Determines whether an ellipse touches or overlaps a triangle, using the default tolerance.

public static bool CollidesWith(GeoEllipse2 ellipse, GeoTriangle2 triangle)

Parameters

ellipse GeoEllipse2
triangle GeoTriangle2

Returns

bool

CollidesWith(GeoEllipse2, GeoTriangle2, Tolerance)

Determines whether an ellipse touches or overlaps a triangle, within a tolerance.

public static bool CollidesWith(GeoEllipse2 ellipse, GeoTriangle2 triangle, Tolerance tolerance)

Parameters

ellipse GeoEllipse2

The ellipse.

triangle GeoTriangle2

The triangle; one whose corners coincide exactly is read as its longest edge, a short side being the side it is.

tolerance Tolerance

The tolerance.

Returns

bool

true if the two come within the point tolerance of each other; otherwise, false.

CollidesWith(GeoEllipse2, GeoFace2)

Determines whether an ellipse reaches the material of a face, using the default tolerance.

public static bool CollidesWith(GeoEllipse2 ellipse, GeoFace2 face)

Parameters

ellipse GeoEllipse2
face GeoFace2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the face is null.

CollidesWith(GeoEllipse2, GeoFace2, Tolerance)

Determines whether an ellipse reaches the material of a face, within a tolerance.

public static bool CollidesWith(GeoEllipse2 ellipse, GeoFace2 face, Tolerance tolerance)

Parameters

ellipse GeoEllipse2

The ellipse.

face GeoFace2

The face: its outline, less its holes.

tolerance Tolerance

The tolerance.

Returns

bool

true if the ellipse comes within the point tolerance of the material, as DistanceTo(GeoEllipse2, GeoFace2, Tolerance) says; otherwise, false.

Remarks

An ellipse wholly inside a hole, or holding it within itself, is told apart from one reaching the material by the exact distance to the rims, so a collision and a distance never disagree. A rim edge whose box lies outside the ellipse's own axis-aligned box, widened by the point tolerance, cannot be within it and is not measured, and the search stops at the first edge within the point tolerance: the answer is the same as the distance's, found sooner.

Exceptions

ArgumentNullException

Thrown when the face is null.

CollidesWith(GeoEllipse2, GeoEdge2)

Determines whether an ellipse touches an edge, using the default tolerance.

public static bool CollidesWith(GeoEllipse2 ellipse, GeoEdge2 edge)

Parameters

ellipse GeoEllipse2
edge GeoEdge2

Returns

bool

CollidesWith(GeoEllipse2, GeoEdge2, Tolerance)

Determines whether an ellipse touches an edge, within a tolerance: as a segment or as an arc, whichever the edge is.

public static bool CollidesWith(GeoEllipse2 ellipse, GeoEdge2 edge, Tolerance tolerance)

Parameters

ellipse GeoEllipse2
edge GeoEdge2
tolerance Tolerance

Returns

bool

CollidesWith(GeoEllipse2, GeoCircle2)

Determines whether an ellipse touches or overlaps a circle, using the default tolerance.

public static bool CollidesWith(GeoEllipse2 ellipse, GeoCircle2 circle)

Parameters

ellipse GeoEllipse2
circle GeoCircle2

Returns

bool

CollidesWith(GeoEllipse2, GeoCircle2, Tolerance)

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

public static bool CollidesWith(GeoEllipse2 ellipse, GeoCircle2 circle, Tolerance tolerance)

Parameters

ellipse GeoEllipse2

The ellipse.

circle GeoCircle2

The circle.

tolerance Tolerance

The tolerance.

Returns

bool

true if the two come within the point tolerance of each other, one inside the other included; otherwise, false.

CollidesWith(GeoEllipse2, GeoArc2)

Determines whether an ellipse touches an arc, using the default tolerance.

public static bool CollidesWith(GeoEllipse2 ellipse, GeoArc2 arc)

Parameters

ellipse GeoEllipse2
arc GeoArc2

Returns

bool

CollidesWith(GeoEllipse2, GeoArc2, Tolerance)

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

public static bool CollidesWith(GeoEllipse2 ellipse, GeoArc2 arc, Tolerance tolerance)

Parameters

ellipse GeoEllipse2

The ellipse.

arc GeoArc2

The arc.

tolerance Tolerance

The tolerance.

Returns

bool

true if the arc comes within the point tolerance of the region, crossing the rim or lying inside; otherwise, false.

CollidesWith(GeoEllipse2, GeoEllipse2)

Determines whether two ellipses touch or overlap, using the default tolerance.

public static bool CollidesWith(GeoEllipse2 ellipse, GeoEllipse2 other)

Parameters

ellipse GeoEllipse2
other GeoEllipse2

Returns

bool

CollidesWith(GeoEllipse2, GeoEllipse2, Tolerance)

Determines whether two ellipses touch or overlap, within a tolerance.

public static bool CollidesWith(GeoEllipse2 ellipse, GeoEllipse2 other, Tolerance tolerance)

Parameters

ellipse GeoEllipse2

The first ellipse.

other GeoEllipse2

The second ellipse.

tolerance Tolerance

The tolerance.

Returns

bool

true if the two come within the point tolerance of each other, one inside the other included; otherwise, false.

CollidesWith(GeoEllipse2, GeoPolylineArc2)

Determines whether an ellipse touches a curved chain, using the default tolerance.

public static bool CollidesWith(GeoEllipse2 ellipse, GeoPolylineArc2 chain)

Parameters

ellipse GeoEllipse2
chain GeoPolylineArc2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoEllipse2, GeoPolylineArc2, Tolerance)

Determines whether an ellipse touches a curved chain, within a tolerance.

public static bool CollidesWith(GeoEllipse2 ellipse, GeoPolylineArc2 chain, Tolerance tolerance)

Parameters

ellipse GeoEllipse2

The ellipse.

chain GeoPolylineArc2

The chain.

tolerance Tolerance

The tolerance.

Returns

bool

true if any edge comes within the point tolerance of the region; otherwise, false.

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoEllipse2, GeoPolygonArc2)

Determines whether an ellipse touches or overlaps a curved loop, using the default tolerance.

public static bool CollidesWith(GeoEllipse2 ellipse, GeoPolygonArc2 loop)

Parameters

ellipse GeoEllipse2
loop GeoPolygonArc2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the loop is null.

CollidesWith(GeoEllipse2, GeoPolygonArc2, Tolerance)

Determines whether an ellipse touches or overlaps a curved loop, within a tolerance.

public static bool CollidesWith(GeoEllipse2 ellipse, GeoPolygonArc2 loop, Tolerance tolerance)

Parameters

ellipse GeoEllipse2

The ellipse.

loop GeoPolygonArc2

The loop.

tolerance Tolerance

The tolerance.

Returns

bool

true if the loop holds the centre, or an edge comes within the point tolerance of the region; otherwise, false.

Exceptions

ArgumentNullException

Thrown when the loop is null.

CollidesWith(GeoEllipse2, GeoRay2)

Determines whether an ellipse touches a ray, using the default tolerance.

public static bool CollidesWith(GeoEllipse2 ellipse, GeoRay2 ray)

Parameters

ellipse GeoEllipse2
ray GeoRay2

Returns

bool

CollidesWith(GeoEllipse2, GeoRay2, Tolerance)

Determines whether an ellipse touches a ray, within a tolerance.

public static bool CollidesWith(GeoEllipse2 ellipse, GeoRay2 ray, Tolerance tolerance)

Parameters

ellipse GeoEllipse2

The ellipse.

ray GeoRay2

The ray.

tolerance Tolerance

The tolerance.

Returns

bool

true if the ray comes within the point tolerance of the region, crossing the rim or starting inside; otherwise, false.