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
circleGeoCircle2The circle.
pointGeoPoint2The 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
circleGeoCircle2The circle.
pointGeoPoint2The target point.
toleranceToleranceThe 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
rectGeoRectangle2The rectangle.
pointGeoPoint2The 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
rectGeoRectangle2The rectangle.
pointGeoPoint2The target point.
toleranceToleranceThe 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
polyGeoPolygon2The polygon.
pointGeoPoint2The 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
polyGeoPolygon2The polygon.
pointGeoPoint2The target point.
toleranceToleranceThe 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
Returns
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
Returns
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
triangleGeoTriangle2pointGeoPoint2
Returns
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
triangleGeoTriangle2pointGeoPoint2toleranceTolerance
Returns
Contains(GeoRectangle2, GeoLine2)
Checks whether a rectangle entirely contains a line segment using default tolerance.
public static bool Contains(GeoRectangle2 rect, GeoLine2 line)
Parameters
rectGeoRectangle2lineGeoLine2
Returns
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
rectGeoRectangle2lineGeoLine2toleranceTolerance
Returns
Contains(GeoRectangle2, GeoPolyline2)
Checks whether a rectangle entirely contains a polyline using default tolerance.
public static bool Contains(GeoRectangle2 rect, GeoPolyline2 polyline)
Parameters
rectGeoRectangle2polylineGeoPolyline2
Returns
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
rectGeoRectangle2polylineGeoPolyline2toleranceTolerance
Returns
Contains(GeoCircle2, GeoCircle2)
Checks whether a circle entirely contains another circle using default tolerance.
public static bool Contains(GeoCircle2 circle, GeoCircle2 other)
Parameters
circleGeoCircle2The outer circle.
otherGeoCircle2The 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
circleGeoCircle2The outer circle.
otherGeoCircle2The inner circle.
toleranceToleranceThe 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
circleGeoCircle2lineGeoLine2
Returns
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
circleGeoCircle2lineGeoLine2toleranceTolerance
Returns
Contains(GeoPolygon2, GeoLine2)
Checks whether a polygon entirely contains a line segment using default tolerance.
public static bool Contains(GeoPolygon2 poly, GeoLine2 line)
Parameters
polyGeoPolygon2The polygon.
lineGeoLine2The 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
polyGeoPolygon2The polygon.
lineGeoLine2The line segment.
toleranceToleranceThe 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
polyGeoPolygon2The polygon.
polylineGeoPolyline2The 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
polyGeoPolygon2The polygon.
polylineGeoPolyline2The polyline.
toleranceToleranceThe 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
loopGeoPolygonArc2pointGeoPoint2
Returns
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
loopGeoPolygonArc2pointGeoPoint2toleranceTolerance
Returns
Exceptions
- ArgumentNullException
Thrown when the loop is null.