Table of Contents

Method Contains

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

Contains(GeoCircle2, GeoPoint2)

Checks whether a circle contains a point using default tolerance.

public static bool Contains(GeoCircle2 circle, GeoPoint2 point)

Parameters

circle GeoCircle2

The circle.

point GeoPoint2

The target point.

Returns

bool

true if the circle contains the point; otherwise, false.

Contains(GeoCircle2, GeoPoint2, Tolerance)

Checks whether a circle contains a point within tolerance.

public static bool Contains(GeoCircle2 circle, GeoPoint2 point, Tolerance tolerance)

Parameters

circle GeoCircle2

The circle.

point GeoPoint2

The target point.

tolerance Tolerance

The tolerance.

Returns

bool

true if the circle contains the point within tolerance; otherwise, false.

Contains(GeoRectangle2, GeoPoint2)

Checks whether a rotated rectangle (GeoRectangle2 OBB) contains a point using default tolerance (accepts points on the boundary).

public static bool Contains(GeoRectangle2 rect, GeoPoint2 point)

Parameters

rect GeoRectangle2

The rectangle.

point GeoPoint2

The target point.

Returns

bool

true if the rectangle contains the point; otherwise, false.

Contains(GeoRectangle2, GeoPoint2, Tolerance)

Checks whether a rotated rectangle (GeoRectangle2 OBB) contains a point within tolerance (accepts points on the boundary).

public static bool Contains(GeoRectangle2 rect, GeoPoint2 point, Tolerance tolerance)

Parameters

rect GeoRectangle2

The rectangle.

point GeoPoint2

The target point.

tolerance Tolerance

The tolerance.

Returns

bool

true if the rectangle contains the point; otherwise, false.

Contains(GeoPolygon2, GeoPoint2)

Checks whether a polygon contains a point using default tolerance (accepts points on the boundary).

public static bool Contains(GeoPolygon2 poly, GeoPoint2 point)

Parameters

poly GeoPolygon2

The polygon.

point GeoPoint2

The target point.

Returns

bool

true if the polygon contains the point; otherwise, false.

Contains(GeoPolygon2, GeoPoint2, Tolerance)

Checks whether a polygon contains a point using the Ray Casting algorithm (accepts points on the boundary).

public static bool Contains(GeoPolygon2 poly, GeoPoint2 point, Tolerance tolerance)

Parameters

poly GeoPolygon2

The polygon.

point GeoPoint2

The target point.

tolerance Tolerance

The tolerance.

Returns

bool

true if the polygon contains the point; otherwise, false.

Remarks

Counting crossings makes this the even-odd rule, which matters only when the polygon is not simple: a region its edges enclose twice reads as outside. That is a definition rather than a failure, and it is the definition every operation resting on this one inherits.

Contains(GeoFace2, GeoPoint2)

Checks whether a face with holes holds a point, on its outline included, using default tolerance.

public static bool Contains(GeoFace2 face, GeoPoint2 point)

Parameters

face GeoFace2
point GeoPoint2

Returns

bool

Contains(GeoFace2, GeoPoint2, Tolerance)

Checks whether a face with holes holds a point, on its outline included, within tolerance.

public static bool Contains(GeoFace2 face, GeoPoint2 point, Tolerance tolerance)

Parameters

face GeoFace2
point GeoPoint2
tolerance Tolerance

Returns

bool

Contains(GeoTriangle2, GeoPoint2)

Checks whether a triangle contains a point using default tolerance (accepts points on the edges).

public static bool Contains(GeoTriangle2 triangle, GeoPoint2 point)

Parameters

triangle GeoTriangle2
point GeoPoint2

Returns

bool

Contains(GeoTriangle2, GeoPoint2, Tolerance)

Checks whether a triangle contains a point within tolerance (accepts points on the edges).

public static bool Contains(GeoTriangle2 triangle, GeoPoint2 point, Tolerance tolerance)

Parameters

triangle GeoTriangle2
point GeoPoint2
tolerance Tolerance

Returns

bool

Contains(GeoRectangle2, GeoLine2)

Checks whether a rectangle entirely contains a line segment using default tolerance.

public static bool Contains(GeoRectangle2 rect, GeoLine2 line)

Parameters

rect GeoRectangle2
line GeoLine2

Returns

bool

Contains(GeoRectangle2, GeoLine2, Tolerance)

Checks whether a rectangle entirely contains a line segment within tolerance. (Since a rectangle is a convex set, a line segment is contained iff both endpoints are contained).

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

Parameters

rect GeoRectangle2
line GeoLine2
tolerance Tolerance

Returns

bool

Contains(GeoRectangle2, GeoPolyline2)

Checks whether a rectangle entirely contains a polyline using default tolerance.

public static bool Contains(GeoRectangle2 rect, GeoPolyline2 polyline)

Parameters

rect GeoRectangle2
polyline GeoPolyline2

Returns

bool

Contains(GeoRectangle2, GeoPolyline2, Tolerance)

Checks whether a rectangle entirely contains a polyline within tolerance.

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

Parameters

rect GeoRectangle2
polyline GeoPolyline2
tolerance Tolerance

Returns

bool

Contains(GeoCircle2, GeoCircle2)

Checks whether a circle entirely contains another circle using default tolerance.

public static bool Contains(GeoCircle2 circle, GeoCircle2 other)

Parameters

circle GeoCircle2

The outer circle.

other GeoCircle2

The inner circle.

Returns

bool

true if the outer circle entirely contains the inner circle; otherwise, false.

Contains(GeoCircle2, GeoCircle2, Tolerance)

Checks whether a circle entirely contains another circle within tolerance.

public static bool Contains(GeoCircle2 circle, GeoCircle2 other, Tolerance tolerance)

Parameters

circle GeoCircle2

The outer circle.

other GeoCircle2

The inner circle.

tolerance Tolerance

The tolerance.

Returns

bool

true if the outer circle entirely contains the inner circle within tolerance; otherwise, false.

Contains(GeoCircle2, GeoLine2)

Checks whether a circle entirely contains a line segment using default tolerance.

public static bool Contains(GeoCircle2 circle, GeoLine2 line)

Parameters

circle GeoCircle2
line GeoLine2

Returns

bool

Contains(GeoCircle2, GeoLine2, Tolerance)

Checks whether a circle entirely contains a line segment within tolerance.

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

Parameters

circle GeoCircle2
line GeoLine2
tolerance Tolerance

Returns

bool

Contains(GeoPolygon2, GeoLine2)

Checks whether a polygon entirely contains a line segment using default tolerance.

public static bool Contains(GeoPolygon2 poly, GeoLine2 line)

Parameters

poly GeoPolygon2

The polygon.

line GeoLine2

The line segment.

Returns

bool

true if the polygon entirely contains the line segment; otherwise, false.

Contains(GeoPolygon2, GeoLine2, Tolerance)

Checks whether a polygon entirely contains a line segment within tolerance.

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

Parameters

poly GeoPolygon2

The polygon.

line GeoLine2

The line segment.

tolerance Tolerance

The tolerance.

Returns

bool

true if the polygon entirely contains the line segment; otherwise, false.

Contains(GeoPolygon2, GeoPolyline2)

Checks whether a polygon entirely contains a polyline using default tolerance.

public static bool Contains(GeoPolygon2 poly, GeoPolyline2 polyline)

Parameters

poly GeoPolygon2

The polygon.

polyline GeoPolyline2

The polyline.

Returns

bool

true if the polygon entirely contains the polyline; otherwise, false.

Contains(GeoPolygon2, GeoPolyline2, Tolerance)

Checks whether a polygon entirely contains a polyline within tolerance.

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

Parameters

poly GeoPolygon2

The polygon.

polyline GeoPolyline2

The polyline.

tolerance Tolerance

The tolerance.

Returns

bool

true if the polygon entirely contains the polyline; otherwise, false.

Contains(GeoPolygonArc2, GeoPoint2)

Determines whether a loop that may curve encloses a point, counting its boundary as inside.

public static bool Contains(GeoPolygonArc2 loop, GeoPoint2 point)

Parameters

loop GeoPolygonArc2
point GeoPoint2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the loop is null.

Contains(GeoPolygonArc2, GeoPoint2, Tolerance)

Determines whether a loop that may curve encloses a point, within a tolerance.

public static bool Contains(GeoPolygonArc2 loop, GeoPoint2 point, Tolerance tolerance)

Parameters

loop GeoPolygonArc2
point GeoPoint2
tolerance Tolerance

Returns

bool

Exceptions

ArgumentNullException

Thrown when the loop is null.