Method TryIntersectWith
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
TryIntersectWith(GeoLine3, GeoLine3, out GeoPoint3)
Tries to find the point where two line segments meet, using the default tolerance.
public static bool TryIntersectWith(GeoLine3 line1, GeoLine3 line2, out GeoPoint3 intersection)
Parameters
Returns
TryIntersectWith(GeoLine3, GeoLine3, out GeoPoint3, Tolerance)
Tries to find the point where two line segments meet, within a tolerance.
public static bool TryIntersectWith(GeoLine3 line1, GeoLine3 line2, out GeoPoint3 intersection, Tolerance tolerance)
Parameters
line1GeoLine3The first segment.
line2GeoLine3The second segment.
intersectionGeoPoint3The crossing point when the method returns true.
toleranceToleranceThe tolerance.
Returns
- bool
true if the segments meet at a single point; otherwise, false.
Remarks
Two segments in space usually pass each other without meeting, so this asks for the closest approach and accepts it only when the gap is within tolerance. Parallel segments are refused even when they overlap, matching the 2D behaviour: a shared stretch is not a point.
TryIntersectWith(GeoLine3, GeoLine3, LineExtension, out GeoPoint3)
Tries to find the point where two line segments meet, reading either or both as the infinite line carrying it, using the default tolerance.
public static bool TryIntersectWith(GeoLine3 line1, GeoLine3 line2, LineExtension extension, out GeoPoint3 intersection)
Parameters
line1GeoLine3line2GeoLine3extensionLineExtensionintersectionGeoPoint3
Returns
TryIntersectWith(GeoLine3, GeoLine3, LineExtension, out GeoPoint3, Tolerance)
Tries to find the point where two line segments meet, reading either or both as the infinite line carrying it, within a tolerance.
public static bool TryIntersectWith(GeoLine3 line1, GeoLine3 line2, LineExtension extension, out GeoPoint3 intersection, Tolerance tolerance)
Parameters
line1GeoLine3The first segment.
line2GeoLine3The second segment.
extensionLineExtensionWhich of the two may be reached past its endpoints.
intersectionGeoPoint3The crossing point when the method returns true.
toleranceToleranceThe tolerance.
Returns
- bool
true if the lines meet at a single point within the reach allowed; otherwise, false.
Remarks
As without an extension, the lines must actually meet: the gap at their closest approach must be within tolerance. Two axes that pass each other in space do not meet however far they are extended; GetShortestLineTo(GeoLine3, GeoLine3, LineExtension, Tolerance) gives the segment bridging them. Parallel lines are refused.
Exceptions
- ArgumentOutOfRangeException
Thrown when the extension is not a defined value.
TryIntersectWith(GeoLine3, GeoPlane3, out GeoPoint3)
Tries to find the point where a line segment crosses a plane, using the default tolerance.
public static bool TryIntersectWith(GeoLine3 line, GeoPlane3 plane, out GeoPoint3 intersection)
Parameters
Returns
TryIntersectWith(GeoLine3, GeoPlane3, out GeoPoint3, Tolerance)
Tries to find the point where a line segment crosses a plane, within a tolerance.
public static bool TryIntersectWith(GeoLine3 line, GeoPlane3 plane, out GeoPoint3 intersection, Tolerance tolerance)
Parameters
Returns
Remarks
A segment running parallel to the plane is refused whether it lies in the plane or beside it: in the first case every one of its points is a crossing, in the second none is, and neither gives the single point this method promises.
TryIntersectWith(GeoRay3, GeoPlane3, out GeoPoint3)
Tries to find the point where a ray crosses a plane, using the default tolerance.
public static bool TryIntersectWith(GeoRay3 ray, GeoPlane3 plane, out GeoPoint3 intersection)
Parameters
Returns
TryIntersectWith(GeoRay3, GeoPlane3, out GeoPoint3, Tolerance)
Tries to find the point where a ray crosses a plane, within a tolerance.
public static bool TryIntersectWith(GeoRay3 ray, GeoPlane3 plane, out GeoPoint3 intersection, Tolerance tolerance)
Parameters
Returns
TryIntersectWith(GeoLine3, GeoTriangle3, out GeoPoint3)
Tries to find the point where a line segment crosses a triangle, using the default tolerance.
public static bool TryIntersectWith(GeoLine3 line, GeoTriangle3 triangle, out GeoPoint3 intersection)
Parameters
lineGeoLine3triangleGeoTriangle3intersectionGeoPoint3
Returns
TryIntersectWith(GeoLine3, GeoTriangle3, out GeoPoint3, Tolerance)
Tries to find the point where a line segment crosses a triangle, within a tolerance.
public static bool TryIntersectWith(GeoLine3 line, GeoTriangle3 triangle, out GeoPoint3 intersection, Tolerance tolerance)
Parameters
lineGeoLine3triangleGeoTriangle3intersectionGeoPoint3toleranceTolerance
Returns
Remarks
The crossing is found against the triangle's carrier plane and then tested for containment, so
the edges of the triangle are decided by the same tolerance-aware test that
Containment3.Contains uses. A segment lying in the plane of the triangle is refused for
the same reason it is refused against a bare plane.
TryIntersectWith(GeoRay3, GeoTriangle3, out GeoPoint3)
Tries to find the point where a ray crosses a triangle, using the default tolerance.
public static bool TryIntersectWith(GeoRay3 ray, GeoTriangle3 triangle, out GeoPoint3 intersection)
Parameters
rayGeoRay3triangleGeoTriangle3intersectionGeoPoint3
Returns
TryIntersectWith(GeoRay3, GeoTriangle3, out GeoPoint3, Tolerance)
Tries to find the point where a ray crosses a triangle, within a tolerance.
public static bool TryIntersectWith(GeoRay3 ray, GeoTriangle3 triangle, out GeoPoint3 intersection, Tolerance tolerance)
Parameters
rayGeoRay3triangleGeoTriangle3intersectionGeoPoint3toleranceTolerance
Returns
TryIntersectWith(GeoPlane3, GeoPlane3, out GeoRay3)
Tries to find the line where two planes meet, using the default tolerance.
public static bool TryIntersectWith(GeoPlane3 plane1, GeoPlane3 plane2, out GeoRay3 intersection)
Parameters
Returns
TryIntersectWith(GeoPlane3, GeoPlane3, out GeoRay3, Tolerance)
Tries to find the line where two planes meet, within a tolerance.
public static bool TryIntersectWith(GeoPlane3 plane1, GeoPlane3 plane2, out GeoRay3 intersection, Tolerance tolerance)
Parameters
plane1GeoPlane3The first plane.
plane2GeoPlane3The second plane.
intersectionGeoRay3A ray along the line of intersection when the method returns true. The line is infinite in both directions and the ray only names it:
GetPointAtDistancetakes negative distances, so the half behind the origin is reachable too.toleranceToleranceThe tolerance.
Returns
- bool
true if the planes meet in a line; otherwise, false.
Remarks
Parallel planes are refused whether they are apart, in which case they never meet, or coincident, in which case they meet everywhere. The origin of the returned ray is the point of the intersection line closest to the world origin, which makes the result depend only on the two planes and not on where their own origins happen to sit.
TryIntersectWith(GeoLine3, GeoPolygon3, out GeoPoint3)
Tries to find the point where a line segment crosses a polygon, using the default tolerance.
public static bool TryIntersectWith(GeoLine3 line, GeoPolygon3 polygon, out GeoPoint3 intersection)
Parameters
lineGeoLine3polygonGeoPolygon3intersectionGeoPoint3
Returns
TryIntersectWith(GeoLine3, GeoPolygon3, out GeoPoint3, Tolerance)
Tries to find the point where a line segment crosses a polygon, within a tolerance.
public static bool TryIntersectWith(GeoLine3 line, GeoPolygon3 polygon, out GeoPoint3 intersection, Tolerance tolerance)
Parameters
lineGeoLine3polygonGeoPolygon3intersectionGeoPoint3toleranceTolerance
Returns
Remarks
The crossing is found against the polygon's carrier plane and then tested for containment, so
the boundary is decided by the same tolerance-aware test Containment3.Contains uses. A
segment lying in the plane of the polygon is refused, as it is against a bare plane: every one
of its points inside the outline would be a crossing.
TryIntersectWith(GeoRay3, GeoPolygon3, out GeoPoint3)
Tries to find the point where a ray crosses a polygon, using the default tolerance.
public static bool TryIntersectWith(GeoRay3 ray, GeoPolygon3 polygon, out GeoPoint3 intersection)
Parameters
rayGeoRay3polygonGeoPolygon3intersectionGeoPoint3
Returns
TryIntersectWith(GeoRay3, GeoPolygon3, out GeoPoint3, Tolerance)
Tries to find the point where a ray crosses a polygon, within a tolerance.
public static bool TryIntersectWith(GeoRay3 ray, GeoPolygon3 polygon, out GeoPoint3 intersection, Tolerance tolerance)
Parameters
rayGeoRay3polygonGeoPolygon3intersectionGeoPoint3toleranceTolerance
Returns
TryIntersectWith(GeoLine3, GeoFace3, out GeoPoint3)
Tries to find the point where a line segment crosses a face, using the default tolerance.
public static bool TryIntersectWith(GeoLine3 line, GeoFace3 face, out GeoPoint3 intersection)
Parameters
Returns
TryIntersectWith(GeoLine3, GeoFace3, out GeoPoint3, Tolerance)
Tries to find the point where a line segment crosses a face, within a tolerance.
public static bool TryIntersectWith(GeoLine3 line, GeoFace3 face, out GeoPoint3 intersection, Tolerance tolerance)
Parameters
Returns
Remarks
The holes in the face are respected: a segment threading through a hole passes through nothing and is reported as missing the face.
TryIntersectWith(GeoRay3, GeoFace3, out GeoPoint3)
Tries to find the point where a ray crosses a face, using the default tolerance.
public static bool TryIntersectWith(GeoRay3 ray, GeoFace3 face, out GeoPoint3 intersection)
Parameters
Returns
TryIntersectWith(GeoRay3, GeoFace3, out GeoPoint3, Tolerance)
Tries to find the point where a ray crosses a face, within a tolerance.
public static bool TryIntersectWith(GeoRay3 ray, GeoFace3 face, out GeoPoint3 intersection, Tolerance tolerance)
Parameters
Returns
TryIntersectWith(GeoPolyline3, GeoPlane3, out GeoPoint3[])
Tries to find where a straight chain crosses a plane.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoPlane3 plane, out GeoPoint3[] intersections)
Parameters
polylineGeoPolyline3planeGeoPlane3intersectionsGeoPoint3[]
Returns
TryIntersectWith(GeoPolyline3, GeoPlane3, out GeoPoint3[], Tolerance)
Tries to find where a straight chain crosses a plane, within a tolerance.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoPlane3 plane, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
polylineGeoPolyline3The chain.
planeGeoPlane3The shape to cross with.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
- bool
true when they cross anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolyline3, GeoLine3, out GeoPoint3[])
Tries to find where a straight chain crosses a segment.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoLine3 line, out GeoPoint3[] intersections)
Parameters
polylineGeoPolyline3lineGeoLine3intersectionsGeoPoint3[]
Returns
TryIntersectWith(GeoPolyline3, GeoLine3, out GeoPoint3[], Tolerance)
Tries to find where a straight chain crosses a segment, within a tolerance.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoLine3 line, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
polylineGeoPolyline3The chain.
lineGeoLine3The shape to cross with.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
- bool
true when they cross anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolyline3, GeoRay3, out GeoPoint3[])
Tries to find where a straight chain crosses a ray.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoRay3 ray, out GeoPoint3[] intersections)
Parameters
polylineGeoPolyline3rayGeoRay3intersectionsGeoPoint3[]
Returns
TryIntersectWith(GeoPolyline3, GeoRay3, out GeoPoint3[], Tolerance)
Tries to find where a straight chain crosses a ray, within a tolerance.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoRay3 ray, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
polylineGeoPolyline3The chain.
rayGeoRay3The shape to cross with.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
- bool
true when they cross anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolyline3, GeoArc3, out GeoPoint3[])
Tries to find where a straight chain crosses an arc.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoArc3 arc, out GeoPoint3[] intersections)
Parameters
polylineGeoPolyline3arcGeoArc3intersectionsGeoPoint3[]
Returns
TryIntersectWith(GeoPolyline3, GeoArc3, out GeoPoint3[], Tolerance)
Tries to find where a straight chain crosses an arc, within a tolerance.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoArc3 arc, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
polylineGeoPolyline3The chain.
arcGeoArc3The shape to cross with.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
- bool
true when they cross anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolyline3, GeoCircle3, out GeoPoint3[])
Tries to find where a straight chain crosses a circle.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoCircle3 circle, out GeoPoint3[] intersections)
Parameters
polylineGeoPolyline3circleGeoCircle3intersectionsGeoPoint3[]
Returns
TryIntersectWith(GeoPolyline3, GeoCircle3, out GeoPoint3[], Tolerance)
Tries to find where a straight chain crosses a circle, within a tolerance.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoCircle3 circle, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
polylineGeoPolyline3The chain.
circleGeoCircle3The shape to cross with.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
- bool
true when they cross anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolyline3, GeoTriangle3, out GeoPoint3[])
Tries to find where a straight chain crosses a triangle.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoTriangle3 triangle, out GeoPoint3[] intersections)
Parameters
polylineGeoPolyline3triangleGeoTriangle3intersectionsGeoPoint3[]
Returns
TryIntersectWith(GeoPolyline3, GeoTriangle3, out GeoPoint3[], Tolerance)
Tries to find where a straight chain crosses a triangle, within a tolerance.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoTriangle3 triangle, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
polylineGeoPolyline3The chain.
triangleGeoTriangle3The shape to cross with.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
- bool
true when they cross anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolyline3, GeoPolygon3, out GeoPoint3[])
Tries to find where a straight chain crosses a polygon.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoPolygon3 polygon, out GeoPoint3[] intersections)
Parameters
polylineGeoPolyline3polygonGeoPolygon3intersectionsGeoPoint3[]
Returns
TryIntersectWith(GeoPolyline3, GeoPolygon3, out GeoPoint3[], Tolerance)
Tries to find where a straight chain crosses a polygon, within a tolerance.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoPolygon3 polygon, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
polylineGeoPolyline3The chain.
polygonGeoPolygon3The shape to cross with.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
- bool
true when they cross anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolyline3, GeoFace3, out GeoPoint3[])
Tries to find where a straight chain crosses a face.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoFace3 face, out GeoPoint3[] intersections)
Parameters
polylineGeoPolyline3faceGeoFace3intersectionsGeoPoint3[]
Returns
TryIntersectWith(GeoPolyline3, GeoFace3, out GeoPoint3[], Tolerance)
Tries to find where a straight chain crosses a face, within a tolerance.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoFace3 face, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
polylineGeoPolyline3The chain.
faceGeoFace3The shape to cross with.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
- bool
true when they cross anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolyline3, GeoObb3, out GeoPoint3[])
Tries to find where a straight chain crosses a box.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoObb3 box, out GeoPoint3[] intersections)
Parameters
polylineGeoPolyline3boxGeoObb3intersectionsGeoPoint3[]
Returns
TryIntersectWith(GeoPolyline3, GeoObb3, out GeoPoint3[], Tolerance)
Tries to find where a straight chain crosses a box, within a tolerance.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoObb3 box, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
polylineGeoPolyline3The chain.
boxGeoObb3The shape to cross with.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
- bool
true when they cross anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolyline3, GeoAabb3, out GeoPoint3[])
Tries to find where a straight chain crosses a square box.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoAabb3 box, out GeoPoint3[] intersections)
Parameters
polylineGeoPolyline3boxGeoAabb3intersectionsGeoPoint3[]
Returns
TryIntersectWith(GeoPolyline3, GeoAabb3, out GeoPoint3[], Tolerance)
Tries to find where a straight chain crosses a square box, within a tolerance.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoAabb3 box, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
polylineGeoPolyline3The chain.
boxGeoAabb3The shape to cross with.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
- bool
true when they cross anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolyline3, GeoSolid3, out GeoPoint3[])
Tries to find where a straight chain crosses a body.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoSolid3 solid, out GeoPoint3[] intersections)
Parameters
polylineGeoPolyline3solidGeoSolid3intersectionsGeoPoint3[]
Returns
TryIntersectWith(GeoPolyline3, GeoSolid3, out GeoPoint3[], Tolerance)
Tries to find where a straight chain crosses a body, within a tolerance.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoSolid3 solid, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
polylineGeoPolyline3The chain.
solidGeoSolid3The shape to cross with.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
- bool
true when they cross anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolyline3, GeoPolyline3, out GeoPoint3[])
Tries to find where two straight chains cross.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoPolyline3 other, out GeoPoint3[] intersections)
Parameters
polylineGeoPolyline3otherGeoPolyline3intersectionsGeoPoint3[]
Returns
TryIntersectWith(GeoPolyline3, GeoPolyline3, out GeoPoint3[], Tolerance)
Tries to find where two straight chains cross, within a tolerance.
public static bool TryIntersectWith(GeoPolyline3 polyline, GeoPolyline3 other, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
polylineGeoPolyline3The first chain.
otherGeoPolyline3The second chain.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
- bool
true when they cross anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when either chain is null.
TryIntersectWith(GeoLine3, GeoRay3, out GeoPoint3[])
Tries to find where a segment crosses a ray.
public static bool TryIntersectWith(GeoLine3 line, GeoRay3 ray, out GeoPoint3[] intersections)
Parameters
Returns
TryIntersectWith(GeoLine3, GeoRay3, out GeoPoint3[], Tolerance)
Tries to find where a segment crosses a ray, within a tolerance.
public static bool TryIntersectWith(GeoLine3 line, GeoRay3 ray, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
lineGeoLine3The segment.
rayGeoRay3The ray.
intersectionsGeoPoint3[]The one place they cross when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
- bool
true when they cross at a place; otherwise, false.
TryIntersectWith(GeoRay3, GeoLine3, out GeoPoint3[])
Tries to find where a ray crosses a segment.
public static bool TryIntersectWith(GeoRay3 ray, GeoLine3 line, out GeoPoint3[] intersections)
Parameters
Returns
TryIntersectWith(GeoRay3, GeoLine3, out GeoPoint3[], Tolerance)
Tries to find where a ray crosses a segment, within a tolerance.
public static bool TryIntersectWith(GeoRay3 ray, GeoLine3 line, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
rayGeoRay3The ray.
lineGeoLine3The segment.
intersectionsGeoPoint3[]The one place they cross when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
- bool
true when they cross at a place; otherwise, false.