Method GetIntersections
- Namespace
- GeometryHelper.Spatial
- Assembly
- GeometryHelper.dll
GetIntersections(GeoRay3)
Gets where a ray passes where the material ends, using the default tolerance.
public GeoPoint3[] GetIntersections(GeoRay3 ray)
Parameters
rayGeoRay3
Returns
GetIntersections(GeoRay3, Tolerance)
Gets where a ray passes where the material ends, in the order the ray meets them, within a tolerance.
public GeoPoint3[] GetIntersections(GeoRay3 ray, Tolerance tolerance)
Parameters
Returns
Remarks
A crossing landing on a seam of the mesh arrives once per triangle and is reported once, as the body reports it. A ray starting within the planar tolerance of where the material ends is read as GetIntersections(GeoRay3, GeoSolid3, Tolerance) reads it: dipping in, it crosses where it reaches the surface, so the ray from (5, 5, 0.0004) along (1, 0, -0.01) enters the box whose top lies in z = 0 at (5.04, 5, 0); rising, it touches at its origin. One starting where the material ends, within the point tolerance of the surface, and crossing no triangle touches it at its origin, as CollidesWith(GeoRay3, Tolerance) reads it: with a planar tolerance of 1E-4, the ray from 0.0007 over the top of the box 100 by 100 by 50 and 0.0007 beyond its side, rising away from both, touches it at its origin, where it collided and was given nothing.
GetIntersections(GeoXLine3)
Gets where a line without ends passes where the material ends, using the default tolerance.
public GeoPoint3[] GetIntersections(GeoXLine3 xline)
Parameters
xlineGeoXLine3
Returns
GetIntersections(GeoXLine3, Tolerance)
Gets where a line without ends passes where the material ends, in the order the line meets them going along its direction, within a tolerance.
public GeoPoint3[] GetIntersections(GeoXLine3 xline, Tolerance tolerance)
Parameters
Returns
Remarks
The line runs both ways from its origin, so the answer is the same wherever along it the origin stands, but for a crossing within rounding of the tolerance. A crossing landing on a seam of the mesh arrives once per triangle and is reported once, as the body reports it. The line through (3, 6, 4) along Z passes the box 10 by 10 by 10 at (3, 6, 0) and (3, 6, 10), in that order. However small the tolerance, a triangle holds a crossing to the rounding of the coordinates, as it holds a ray's, and below that rounding, and only there, the two crossings of a seam within eight times it of each other are one, measured from near the body along the line: at a tolerance of nought the line through a cylinder of radius 20 turned about in space is given its two crossings, where 950 of 1 000 were given one or none.