Method TryIntersectWith
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
TryIntersectWith(GeoLine3, out GeoPoint3)
Tries to find the point where a line segment crosses this triangle, using the default tolerance.
public bool TryIntersectWith(GeoLine3 line, out GeoPoint3 intersection)
Parameters
Returns
TryIntersectWith(GeoLine3, out GeoPoint3, Tolerance)
Tries to find the point where a line segment crosses this triangle, within a tolerance.
public bool TryIntersectWith(GeoLine3 line, out GeoPoint3 intersection, Tolerance tolerance)
Parameters
Returns
TryIntersectWith(GeoRay3, out GeoPoint3)
Tries to find the point where a ray crosses this triangle, using the default tolerance.
public bool TryIntersectWith(GeoRay3 ray, out GeoPoint3 intersection)
Parameters
Returns
TryIntersectWith(GeoRay3, out GeoPoint3, Tolerance)
Tries to find the point where a ray crosses this triangle, within a tolerance: the first point GetIntersections(GeoTriangle3, Tolerance) gives, and false where it gives none.
public bool TryIntersectWith(GeoRay3 ray, out GeoPoint3 intersection, Tolerance tolerance)
Parameters
Returns
TryIntersectWith(GeoArc3, out GeoPoint3[])
Tries to find where an arc crosses this triangle, using the default tolerance.
public bool TryIntersectWith(GeoArc3 arc, out GeoPoint3[] intersections)
Parameters
arcGeoArc3The arc.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
Returns
TryIntersectWith(GeoArc3, out GeoPoint3[], Tolerance)
Tries to find where an arc crosses this triangle, within a tolerance.
public bool TryIntersectWith(GeoArc3 arc, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
arcGeoArc3The arc.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
TryIntersectWith(GeoCircle3, out GeoPoint3[])
Tries to find where a circle crosses this triangle, using the default tolerance.
public bool TryIntersectWith(GeoCircle3 circle, out GeoPoint3[] intersections)
Parameters
circleGeoCircle3The circle.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
Returns
TryIntersectWith(GeoCircle3, out GeoPoint3[], Tolerance)
Tries to find where a circle crosses this triangle, within a tolerance.
public bool TryIntersectWith(GeoCircle3 circle, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
circleGeoCircle3The circle.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
TryIntersectWith(GeoPolyline3, out GeoPoint3[])
Tries to find where this triangle crosses a straight chain: the same answer, and the same points in the same order, as TryIntersectWith(GeoTriangle3, out GeoPoint3[]).
public bool TryIntersectWith(GeoPolyline3 polyline, out GeoPoint3[] intersections)
Parameters
polylineGeoPolyline3intersectionsGeoPoint3[]
Returns
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolyline3, out GeoPoint3[], Tolerance)
Tries to find where this triangle crosses a straight chain, within a tolerance: the same answer, and the same points in the same order, as TryIntersectWith(GeoTriangle3, out GeoPoint3[], Tolerance).
public bool TryIntersectWith(GeoPolyline3 polyline, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
polylineGeoPolyline3intersectionsGeoPoint3[]toleranceTolerance
Returns
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolygon3, out GeoPoint3[])
Tries to find where this triangle and a polygon cross: the same answer, and the same points in the same order, as TryIntersectWith(GeoTriangle3, GeoPolygon3, out GeoPoint3[]).
public bool TryIntersectWith(GeoPolygon3 polygon, out GeoPoint3[] intersections)
Parameters
polygonGeoPolygon3The polygon.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
Returns
Remarks
The triangle with corners (0, 0, 0), (100, 0, 0) and (0, 100, 0) and the square 100 by 100 standing upright across it along y = 50 from z = -50 to 50 cross at (50, 50, 0) and (0, 50, 0).
Exceptions
- ArgumentNullException
Thrown when the polygon is null.
TryIntersectWith(GeoPolygon3, out GeoPoint3[], Tolerance)
Tries to find where this triangle and a polygon cross, within a tolerance: the same answer, and the same points in the same order, as TryIntersectWith(GeoTriangle3, GeoPolygon3, out GeoPoint3[], Tolerance).
public bool TryIntersectWith(GeoPolygon3 polygon, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
polygonGeoPolygon3The polygon.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
Remarks
The triangle with corners (0, 0, 0), (100, 0, 0) and (0, 100, 0) and the square 100 by 100 standing upright across it along y = 50 from z = -50 to 50 cross at (50, 50, 0) and (0, 50, 0).
Exceptions
- ArgumentNullException
Thrown when the polygon is null.
TryIntersectWith(GeoFace3, out GeoPoint3[])
Tries to find where this triangle and the material of a face cross: the same answer, and the same points in the same order, as TryIntersectWith(GeoTriangle3, GeoFace3, out GeoPoint3[]).
public bool TryIntersectWith(GeoFace3 face, out GeoPoint3[] intersections)
Parameters
faceGeoFace3The face, read by its material.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
Returns
Remarks
The square 100 by 100 in the floor with a hole 40 by 40 in its middle and the triangle with corners (40, 50, -10), (60, 50, -10) and (50, 50, 10), standing in the hole, do not meet; moved 30 along X, onto the material, they do.
Exceptions
- ArgumentNullException
Thrown when the face is null.
TryIntersectWith(GeoFace3, out GeoPoint3[], Tolerance)
Tries to find where this triangle and the material of a face cross, within a tolerance: the same answer, and the same points in the same order, as TryIntersectWith(GeoTriangle3, GeoFace3, out GeoPoint3[], Tolerance).
public bool TryIntersectWith(GeoFace3 face, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
faceGeoFace3The face, read by its material.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
Remarks
The square 100 by 100 in the floor with a hole 40 by 40 in its middle and the triangle with corners (40, 50, -10), (60, 50, -10) and (50, 50, 10), standing in the hole, do not meet; moved 30 along X, onto the material, they do.
Exceptions
- ArgumentNullException
Thrown when the face is null.
TryIntersectWith(GeoTriangle3, out GeoPoint3[])
Tries to find where this triangle and another cross: the same answer, and the same points in the same order, as TryIntersectWith(GeoTriangle3, GeoTriangle3, out GeoPoint3[]).
public bool TryIntersectWith(GeoTriangle3 other, out GeoPoint3[] intersections)
Parameters
otherGeoTriangle3The triangle.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
Returns
Remarks
The triangle with corners (0, 0, 0), (100, 0, 0) and (0, 100, 0) and the upright one with corners (0, 50, -50), (100, 50, -50) and (0, 50, 50) cross at (50, 50, 0) and (0, 50, 0).
TryIntersectWith(GeoTriangle3, out GeoPoint3[], Tolerance)
Tries to find where this triangle and another cross, within a tolerance: the same answer, and the same points in the same order, as TryIntersectWith(GeoTriangle3, GeoTriangle3, out GeoPoint3[], Tolerance).
public bool TryIntersectWith(GeoTriangle3 other, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
otherGeoTriangle3The triangle.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
Remarks
The triangle with corners (0, 0, 0), (100, 0, 0) and (0, 100, 0) and the upright one with corners (0, 50, -50), (100, 50, -50) and (0, 50, 50) cross at (50, 50, 0) and (0, 50, 0).
TryIntersectWith(GeoPlane3, out GeoPoint3[])
Tries to find where the edges of this triangle cross a plane: the same answer, and the same points in the same order, as TryIntersectWith(GeoPlane3, GeoTriangle3, out GeoPoint3[]).
public bool TryIntersectWith(GeoPlane3 plane, out GeoPoint3[] intersections)
Parameters
planeGeoPlane3The plane.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
Returns
Remarks
The floor plane and the triangle with corners (0, 50, -50), (100, 50, -50) and (0, 50, 50) standing across it cross at (50, 50, 0) and (0, 50, 0); a triangle lying in the floor touches it and crosses it nowhere.
TryIntersectWith(GeoPlane3, out GeoPoint3[], Tolerance)
Tries to find where the edges of this triangle cross a plane, within a tolerance: the same answer, and the same points in the same order, as TryIntersectWith(GeoPlane3, GeoTriangle3, out GeoPoint3[], Tolerance).
public bool TryIntersectWith(GeoPlane3 plane, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
planeGeoPlane3The plane.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
Remarks
The floor plane and the triangle with corners (0, 50, -50), (100, 50, -50) and (0, 50, 50) standing across it cross at (50, 50, 0) and (0, 50, 0); a triangle lying in the floor touches it and crosses it nowhere.
TryIntersectWith(GeoSolid3, out GeoPoint3[])
Tries to find where this triangle and the surface of a solid cross: the same answer, and the same points in the same order, as TryIntersectWith(GeoTriangle3, GeoSolid3, out GeoPoint3[]).
public bool TryIntersectWith(GeoSolid3 solid, out GeoPoint3[] intersections)
Parameters
solidGeoSolid3The solid, read by its material.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
Returns
Remarks
A box 100 by 100 by 100 with a corner at the origin and the triangle with corners (-50, -50, 50), (300, -50, 50) and (-50, 300, 50) lying across it at half its height cross at (0, 0, 50), (100, 0, 50), (100, 100, 50) and (0, 100, 50); a triangle wholly inside the box crosses nothing and touches it.
Exceptions
- ArgumentNullException
Thrown when the solid is null.
TryIntersectWith(GeoSolid3, out GeoPoint3[], Tolerance)
Tries to find where this triangle and the surface of a solid cross, within a tolerance: the same answer, and the same points in the same order, as TryIntersectWith(GeoTriangle3, GeoSolid3, out GeoPoint3[], Tolerance).
public bool TryIntersectWith(GeoSolid3 solid, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
solidGeoSolid3The solid, read by its material.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
Remarks
A box 100 by 100 by 100 with a corner at the origin and the triangle with corners (-50, -50, 50), (300, -50, 50) and (-50, 300, 50) lying across it at half its height cross at (0, 0, 50), (100, 0, 50), (100, 100, 50) and (0, 100, 50); a triangle wholly inside the box crosses nothing and touches it.
Exceptions
- ArgumentNullException
Thrown when the solid is null.
TryIntersectWith(GeoObb3, out GeoPoint3[])
Tries to find where this triangle and the surface of an oriented box cross: the same answer, and the same points in the same order, as TryIntersectWith(GeoTriangle3, GeoObb3, out GeoPoint3[]).
public bool TryIntersectWith(GeoObb3 box, out GeoPoint3[] intersections)
Parameters
boxGeoObb3The oriented box.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
Returns
Remarks
A box 100 by 100 by 100 with a corner at the origin and the triangle with corners (-50, -50, 50), (300, -50, 50) and (-50, 300, 50) cross at four points at height 50; a triangle wholly inside the box touches it and crosses nothing.
Exceptions
- ArgumentNullException
Thrown when the box is null.
TryIntersectWith(GeoObb3, out GeoPoint3[], Tolerance)
Tries to find where this triangle and the surface of an oriented box cross, within a tolerance: the same answer, and the same points in the same order, as TryIntersectWith(GeoTriangle3, GeoObb3, out GeoPoint3[], Tolerance).
public bool TryIntersectWith(GeoObb3 box, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
boxGeoObb3The oriented box.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
Remarks
A box 100 by 100 by 100 with a corner at the origin and the triangle with corners (-50, -50, 50), (300, -50, 50) and (-50, 300, 50) cross at four points at height 50; a triangle wholly inside the box touches it and crosses nothing.
Exceptions
- ArgumentNullException
Thrown when the box is null.
TryIntersectWith(GeoAabb3, out GeoPoint3[])
Tries to find where this triangle and the surface of an axis-aligned box cross: the same answer, and the same points in the same order, as TryIntersectWith(GeoTriangle3, GeoAabb3, out GeoPoint3[]).
public bool TryIntersectWith(GeoAabb3 box, out GeoPoint3[] intersections)
Parameters
boxGeoAabb3The axis-aligned box.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
Returns
Remarks
A box 100 by 100 by 100 with a corner at the origin and the triangle with corners (-50, -50, 50), (300, -50, 50) and (-50, 300, 50) cross at four points at height 50; a triangle wholly inside the box touches it and crosses nothing.
TryIntersectWith(GeoAabb3, out GeoPoint3[], Tolerance)
Tries to find where this triangle and the surface of an axis-aligned box cross, within a tolerance: the same answer, and the same points in the same order, as TryIntersectWith(GeoTriangle3, GeoAabb3, out GeoPoint3[], Tolerance).
public bool TryIntersectWith(GeoAabb3 box, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
boxGeoAabb3The axis-aligned box.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
Remarks
A box 100 by 100 by 100 with a corner at the origin and the triangle with corners (-50, -50, 50), (300, -50, 50) and (-50, 300, 50) cross at four points at height 50; a triangle wholly inside the box touches it and crosses nothing.
TryIntersectWith(GeoSphere3, out GeoPoint3[])
Tries to find where this triangle crosses the surface of a ball, using the default tolerance.
public bool TryIntersectWith(GeoSphere3 sphere, out GeoPoint3[] intersections)
Parameters
sphereGeoSphere3The ball.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
Returns
TryIntersectWith(GeoSphere3, out GeoPoint3[], Tolerance)
Tries to find where this triangle crosses the surface of a ball, within a tolerance.
public bool TryIntersectWith(GeoSphere3 sphere, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
sphereGeoSphere3The ball.
intersectionsGeoPoint3[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
TryIntersectWith(GeoSpline3, out GeoPoint3[])
Tries to find where this triangle meets a spline, using the default tolerance.
public bool TryIntersectWith(GeoSpline3 spline, out GeoPoint3[] intersections)
Parameters
splineGeoSpline3The spline.
intersectionsGeoPoint3[]The points when the method returns true; empty otherwise.
Returns
Exceptions
- ArgumentNullException
Thrown when the spline is null.
TryIntersectWith(GeoSpline3, out GeoPoint3[], Tolerance)
Tries to find where this triangle meets a spline, within a tolerance.
public bool TryIntersectWith(GeoSpline3 spline, out GeoPoint3[] intersections, Tolerance tolerance)
Parameters
splineGeoSpline3The spline.
intersectionsGeoPoint3[]The points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
Exceptions
- ArgumentNullException
Thrown when the spline is null.
TryIntersectWith(GeoXLine3, out GeoPoint3)
Tries to find the point where this triangle crosses an infinite line, using the default tolerance.
public bool TryIntersectWith(GeoXLine3 xline, out GeoPoint3 intersection)
Parameters
Returns
TryIntersectWith(GeoXLine3, out GeoPoint3, Tolerance)
Tries to find the point where this triangle crosses an infinite line, within a tolerance.
public bool TryIntersectWith(GeoXLine3 xline, out GeoPoint3 intersection, Tolerance tolerance)
Parameters
xlineGeoXLine3The infinite line.
intersectionGeoPoint3The crossing point if successful.
toleranceToleranceThe tolerance.