Method Contains
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
Contains(GeoEllipse2, GeoLine2)
Checks whether an ellipse holds a segment whole, using the default tolerance.
public static bool Contains(GeoEllipse2 ellipse, GeoLine2 line)
Parameters
ellipseGeoEllipse2lineGeoLine2
Returns
Contains(GeoEllipse2, GeoLine2, Tolerance)
Checks whether an ellipse holds a segment whole, within a tolerance.
public static bool Contains(GeoEllipse2 ellipse, GeoLine2 line, Tolerance tolerance)
Parameters
ellipseGeoEllipse2The ellipse.
lineGeoLine2The segment.
toleranceToleranceThe tolerance.
Returns
- bool
true if both ends are contained, which for a region with no dent is the whole segment; otherwise, false.
Contains(GeoEllipse2, GeoCircle2)
Checks whether an ellipse holds a circle whole, using the default tolerance.
public static bool Contains(GeoEllipse2 ellipse, GeoCircle2 circle)
Parameters
ellipseGeoEllipse2circleGeoCircle2
Returns
Contains(GeoEllipse2, GeoCircle2, Tolerance)
Checks whether an ellipse holds a circle whole, within a tolerance.
public static bool Contains(GeoEllipse2 ellipse, GeoCircle2 circle, Tolerance tolerance)
Parameters
ellipseGeoEllipse2The ellipse.
circleGeoCircle2The circle.
toleranceToleranceThe tolerance: the circle may reach past the rim by up to its point tolerance.
Returns
- bool
true if the circle's centre lies inside, at least its radius less the point tolerance from the rim; otherwise, false. The ellipse 300 by 100 holds the circle of radius 100 about its centre, which touches it at the ends of the minor axis, and not one of radius 101.
Contains(GeoEllipse2, GeoEllipse2)
Checks whether an ellipse holds another whole, using the default tolerance.
public static bool Contains(GeoEllipse2 ellipse, GeoEllipse2 other)
Parameters
ellipseGeoEllipse2otherGeoEllipse2
Returns
Contains(GeoEllipse2, GeoEllipse2, Tolerance)
Checks whether an ellipse holds another whole, within a tolerance.
public static bool Contains(GeoEllipse2 ellipse, GeoEllipse2 other, Tolerance tolerance)
Parameters
ellipseGeoEllipse2The outer ellipse.
otherGeoEllipse2The inner ellipse.
toleranceToleranceThe tolerance: the inner one may reach past the rim by up to its point tolerance.
Returns
- bool
true if no point of the other's rim lies further outside than the point tolerance; otherwise, false. One touching the rim from inside is held, as a circle holds a circle touching it from inside.
Remarks
The other lies wholly inside when the first's equation along its rim is nowhere above nought, read exactly at the turning points. Otherwise the furthest it reaches out is found by Brent's method from 36 starts round its rim, as the distance between two ellipses is.
Contains(GeoEllipse2, GeoPoint2)
Checks whether an ellipse contains a point, using the default tolerance. A point on the rim is contained.
public static bool Contains(GeoEllipse2 ellipse, GeoPoint2 point)
Parameters
ellipseGeoEllipse2pointGeoPoint2
Returns
Contains(GeoEllipse2, GeoPoint2, Tolerance)
Checks whether an ellipse contains a point, within a tolerance. A point on the rim, or outside it by no more than the point tolerance, is contained, as it is by a circle.
public static bool Contains(GeoEllipse2 ellipse, GeoPoint2 point, Tolerance tolerance)
Parameters
ellipseGeoEllipse2The ellipse.
pointGeoPoint2The point.
toleranceToleranceThe tolerance: how far from the rim, in drawing units, a point still lies on it.
Returns
- bool
true if the point lies inside the ellipse or on its rim; otherwise, false.