Method CollidesWith
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
CollidesWith(GeoArc3, GeoSolid3)
Determines whether an arc touches a solid.
public static bool CollidesWith(GeoArc3 arc, GeoSolid3 solid)
Parameters
Returns
CollidesWith(GeoArc3, GeoSolid3, Tolerance)
Determines whether an arc touches a solid, within a tolerance.
public static bool CollidesWith(GeoArc3 arc, GeoSolid3 solid, Tolerance tolerance)
Parameters
Returns
Remarks
They touch where the exact gap between the arc and the surface of the body is no more than the point tolerance, or where the body holds an end of the arc: an arc inside the body crosses its surface nowhere and is in it all the same. The same question keeps an arc inside an opening out: an opening is not material. A body is held to within a billionth of a millimetre, so that rounding in a turned body cannot lose an arc lying on a face, and further out than a million to 1E-15 of the largest coordinate of the body and the point, past the rounding there.
Exceptions
- ArgumentNullException
Thrown when the solid is null.
CollidesWith(GeoArc3, GeoObb3)
Determines whether an arc touches an oriented box.
public static bool CollidesWith(GeoArc3 arc, GeoObb3 box)
Parameters
Returns
CollidesWith(GeoArc3, GeoObb3, Tolerance)
Determines whether an arc touches an oriented box, within a tolerance.
public static bool CollidesWith(GeoArc3 arc, GeoObb3 box, Tolerance tolerance)
Parameters
Returns
Remarks
An arc wholly inside the box crosses no face and is in it all the same. The box is read as its body, and they touch where the exact gap is no more than the point tolerance or the box holds an end of the arc, as for a solid.
Exceptions
- ArgumentNullException
Thrown when the box is null.
CollidesWith(GeoArc3, GeoAabb3)
Determines whether an arc touches an axis-aligned box.
public static bool CollidesWith(GeoArc3 arc, GeoAabb3 box)
Parameters
Returns
CollidesWith(GeoArc3, GeoAabb3, Tolerance)
Determines whether an arc touches an axis-aligned box, within a tolerance.
public static bool CollidesWith(GeoArc3 arc, GeoAabb3 box, Tolerance tolerance)
Parameters
arcGeoArc3The arc.
boxGeoAabb3The box; an empty one is touched by nothing.
toleranceToleranceThe tolerance.
Returns
CollidesWith(GeoCircle3, GeoSolid3)
Determines whether a circle touches a solid.
public static bool CollidesWith(GeoCircle3 circle, GeoSolid3 solid)
Parameters
circleGeoCircle3solidGeoSolid3
Returns
CollidesWith(GeoCircle3, GeoSolid3, Tolerance)
Determines whether a circle touches a solid, within a tolerance.
public static bool CollidesWith(GeoCircle3 circle, GeoSolid3 solid, Tolerance tolerance)
Parameters
circleGeoCircle3The circle.
solidGeoSolid3The solid.
toleranceToleranceThe tolerance.
Returns
CollidesWith(GeoCircle3, GeoObb3)
Determines whether a circle touches an oriented box.
public static bool CollidesWith(GeoCircle3 circle, GeoObb3 box)
Parameters
circleGeoCircle3boxGeoObb3
Returns
CollidesWith(GeoCircle3, GeoObb3, Tolerance)
Determines whether a circle touches an oriented box, within a tolerance.
public static bool CollidesWith(GeoCircle3 circle, GeoObb3 box, Tolerance tolerance)
Parameters
circleGeoCircle3The circle.
boxGeoObb3The box.
toleranceToleranceThe tolerance.
Returns
CollidesWith(GeoCircle3, GeoAabb3)
Determines whether a circle touches an axis-aligned box.
public static bool CollidesWith(GeoCircle3 circle, GeoAabb3 box)
Parameters
circleGeoCircle3boxGeoAabb3
Returns
CollidesWith(GeoCircle3, GeoAabb3, Tolerance)
Determines whether a circle touches an axis-aligned box, within a tolerance.
public static bool CollidesWith(GeoCircle3 circle, GeoAabb3 box, Tolerance tolerance)
Parameters
circleGeoCircle3The circle.
boxGeoAabb3The box.
toleranceToleranceThe tolerance.
Returns
CollidesWith(GeoCircle3, GeoPlane3)
Determines whether a circle touches a plane.
public static bool CollidesWith(GeoCircle3 circle, GeoPlane3 plane)
Parameters
circleGeoCircle3planeGeoPlane3
Returns
CollidesWith(GeoCircle3, GeoPlane3, Tolerance)
Determines whether a circle touches a plane, within a tolerance.
public static bool CollidesWith(GeoCircle3 circle, GeoPlane3 plane, Tolerance tolerance)
Parameters
circleGeoCircle3planeGeoPlane3toleranceTolerance
Returns
CollidesWith(GeoCircle3, GeoLine3)
Determines whether a circle touches a segment.
public static bool CollidesWith(GeoCircle3 circle, GeoLine3 line)
Parameters
circleGeoCircle3lineGeoLine3
Returns
CollidesWith(GeoCircle3, GeoLine3, Tolerance)
Determines whether a circle touches a segment, within a tolerance.
public static bool CollidesWith(GeoCircle3 circle, GeoLine3 line, Tolerance tolerance)
Parameters
circleGeoCircle3lineGeoLine3toleranceTolerance
Returns
Remarks
The rim is what counts, not the disc: a segment crossing the middle of the circle without reaching the rim touches nothing here. Contains(GeoCircle3, GeoPoint3) is the one that reads a circle as filled.
CollidesWith(GeoCircle3, GeoRay3)
Determines whether a circle touches a ray.
public static bool CollidesWith(GeoCircle3 circle, GeoRay3 ray)
Parameters
circleGeoCircle3rayGeoRay3
Returns
CollidesWith(GeoCircle3, GeoRay3, Tolerance)
Determines whether a circle touches a ray, within a tolerance.
public static bool CollidesWith(GeoCircle3 circle, GeoRay3 ray, Tolerance tolerance)
Parameters
circleGeoCircle3rayGeoRay3toleranceTolerance
Returns
CollidesWith(GeoArc3, GeoPlane3)
Determines whether an arc touches a plane.
public static bool CollidesWith(GeoArc3 arc, GeoPlane3 plane)
Parameters
Returns
CollidesWith(GeoArc3, GeoPlane3, Tolerance)
Determines whether an arc touches a plane, within a tolerance.
public static bool CollidesWith(GeoArc3 arc, GeoPlane3 plane, Tolerance tolerance)
Parameters
Returns
Remarks
An arc lying in the plane touches it everywhere, so this is true where GetIntersections(GeoArc3, GeoPlane3, Tolerance) is empty. The two answer different questions and that is the one case where they part.
CollidesWith(GeoArc3, GeoLine3)
Determines whether an arc touches a segment.
public static bool CollidesWith(GeoArc3 arc, GeoLine3 line)
Parameters
Returns
CollidesWith(GeoArc3, GeoLine3, Tolerance)
Determines whether an arc touches a segment, within a tolerance.
public static bool CollidesWith(GeoArc3 arc, GeoLine3 line, Tolerance tolerance)
Parameters
Returns
Remarks
Neither has an inside, so they touch where the exact gap between them is no more than the point tolerance, in space and in whatever plane they lie: the arc of radius 50 about the origin from (50, 0, 0) a quarter turn counter-clockwise touches the segment from (50.0005, 0, 0) to (80, 0, 0), 0.0005 off its start, and not the one from (50.0015, 0, 0), and the one from (20, 40, 0.0003) to (40, 40, 0.0003), hovering 0.0003 over the arc where it crosses (30, 40), touches it. A segment no longer than the tolerance is read as its start unless it truly meets the arc.
CollidesWith(GeoArc3, GeoRay3)
Determines whether an arc touches a ray.
public static bool CollidesWith(GeoArc3 arc, GeoRay3 ray)
Parameters
Returns
CollidesWith(GeoArc3, GeoRay3, Tolerance)
Determines whether an arc touches a ray, within a tolerance.
public static bool CollidesWith(GeoArc3 arc, GeoRay3 ray, Tolerance tolerance)
Parameters
Returns
Remarks
They touch where the exact gap between them is no more than the point tolerance, as for a segment.
CollidesWith(GeoArc3, GeoArc3)
Determines whether two arcs touch.
public static bool CollidesWith(GeoArc3 first, GeoArc3 second)
Parameters
Returns
CollidesWith(GeoArc3, GeoArc3, Tolerance)
Determines whether two arcs touch, within a tolerance.
public static bool CollidesWith(GeoArc3 first, GeoArc3 second, Tolerance tolerance)
Parameters
Returns
Remarks
They touch where the exact gap between them is no more than the point tolerance, in space and in whatever planes they lie: two arcs of one circle touch wherever their sweeps overlap or end within the tolerance of one another, the arc of radius 50 about the origin from (50, 0, 0) a quarter turn counter-clockwise touches the arc of radius 50.0005 about the same centre, and not the arc of radius 50.0015.
CollidesWith(GeoArc3, GeoCircle3)
Determines whether an arc touches a circle.
public static bool CollidesWith(GeoArc3 arc, GeoCircle3 circle)
Parameters
arcGeoArc3circleGeoCircle3
Returns
CollidesWith(GeoArc3, GeoCircle3, Tolerance)
Determines whether an arc touches a circle, within a tolerance.
public static bool CollidesWith(GeoArc3 arc, GeoCircle3 circle, Tolerance tolerance)
Parameters
arcGeoArc3The arc.
circleGeoCircle3The circle.
toleranceToleranceThe tolerance.
Returns
CollidesWith(GeoCircle3, GeoCircle3)
Determines whether two circles touch.
public static bool CollidesWith(GeoCircle3 first, GeoCircle3 second)
Parameters
firstGeoCircle3secondGeoCircle3
Returns
CollidesWith(GeoCircle3, GeoCircle3, Tolerance)
Determines whether two circles touch, within a tolerance.
public static bool CollidesWith(GeoCircle3 first, GeoCircle3 second, Tolerance tolerance)
Parameters
firstGeoCircle3The first circle.
secondGeoCircle3The second circle.
toleranceToleranceThe tolerance.
Returns
CollidesWith(GeoArc3, GeoTriangle3)
Determines whether an arc touches a triangle.
public static bool CollidesWith(GeoArc3 arc, GeoTriangle3 triangle)
Parameters
arcGeoArc3triangleGeoTriangle3
Returns
CollidesWith(GeoArc3, GeoTriangle3, Tolerance)
Determines whether an arc touches a triangle, within a tolerance.
public static bool CollidesWith(GeoArc3 arc, GeoTriangle3 triangle, Tolerance tolerance)
Parameters
arcGeoArc3The arc.
triangleGeoTriangle3The triangle.
toleranceToleranceThe tolerance.
Returns
Remarks
The triangle is read filled, and they touch where the exact gap between them is no more than the point tolerance: an arc lying in the triangle's plane and wholly within it touches, one 0.0005 off its side in the plane touches, and one hovering 0.0003 over it touches. A triangle with no area is the segment it has collapsed to, and touches as its distance says.
CollidesWith(GeoArc3, GeoPolygon3)
Determines whether an arc touches a polygon.
public static bool CollidesWith(GeoArc3 arc, GeoPolygon3 polygon)
Parameters
arcGeoArc3polygonGeoPolygon3
Returns
CollidesWith(GeoArc3, GeoPolygon3, Tolerance)
Determines whether an arc touches a polygon, within a tolerance.
public static bool CollidesWith(GeoArc3 arc, GeoPolygon3 polygon, Tolerance tolerance)
Parameters
arcGeoArc3The arc.
polygonGeoPolygon3The polygon.
toleranceToleranceThe tolerance.
Returns
Remarks
The polygon is read filled, and they touch where the exact gap between them is no more than the point tolerance, as for a triangle.
Exceptions
- ArgumentNullException
Thrown when the polygon is null.
CollidesWith(GeoArc3, GeoFace3)
Determines whether an arc touches a face.
public static bool CollidesWith(GeoArc3 arc, GeoFace3 face)
Parameters
Returns
CollidesWith(GeoArc3, GeoFace3, Tolerance)
Determines whether an arc touches a face, within a tolerance.
public static bool CollidesWith(GeoArc3 arc, GeoFace3 face, Tolerance tolerance)
Parameters
Returns
Remarks
The material is what counts. An arc running down the middle of a hole pierces the plane of the face where there is no face, and touches nothing. They touch where the exact gap between them is no more than the point tolerance, as for a triangle.
Exceptions
- ArgumentNullException
Thrown when the face is null.
CollidesWith(GeoCircle3, GeoTriangle3)
Determines whether a circle touches a triangle.
public static bool CollidesWith(GeoCircle3 circle, GeoTriangle3 triangle)
Parameters
circleGeoCircle3triangleGeoTriangle3
Returns
CollidesWith(GeoCircle3, GeoTriangle3, Tolerance)
Determines whether a circle touches a triangle, within a tolerance.
public static bool CollidesWith(GeoCircle3 circle, GeoTriangle3 triangle, Tolerance tolerance)
Parameters
circleGeoCircle3The circle.
triangleGeoTriangle3The triangle.
toleranceToleranceThe tolerance.
Returns
CollidesWith(GeoCircle3, GeoPolygon3)
Determines whether a circle touches a polygon.
public static bool CollidesWith(GeoCircle3 circle, GeoPolygon3 polygon)
Parameters
circleGeoCircle3polygonGeoPolygon3
Returns
CollidesWith(GeoCircle3, GeoPolygon3, Tolerance)
Determines whether a circle touches a polygon, within a tolerance.
public static bool CollidesWith(GeoCircle3 circle, GeoPolygon3 polygon, Tolerance tolerance)
Parameters
circleGeoCircle3The circle.
polygonGeoPolygon3The polygon.
toleranceToleranceThe tolerance.
Returns
CollidesWith(GeoCircle3, GeoFace3)
Determines whether a circle touches a face.
public static bool CollidesWith(GeoCircle3 circle, GeoFace3 face)
Parameters
circleGeoCircle3faceGeoFace3
Returns
CollidesWith(GeoCircle3, GeoFace3, Tolerance)
Determines whether a circle touches a face, within a tolerance.
public static bool CollidesWith(GeoCircle3 circle, GeoFace3 face, Tolerance tolerance)
Parameters
circleGeoCircle3The circle.
faceGeoFace3The face.
toleranceToleranceThe tolerance.