Legend Class Struct Enum Interface Delegate | Constructor Method Property Event Field |
| Static class: RT.Util.Geometry.IntersectSummary
A utility class to find / test for intersections between geometric shapes.
In this static class, function names always have the two basic shapes ordered using the following order: [Unrecognized tag: "list"][Unrecognized tag: "item"]Line (infinite)[Unrecognized tag: "item"]Ray (starts at a point, extends to infinity)[Unrecognized tag: "item"]Segment (starts and ends on finite points)[Unrecognized tag: "item"]Circle[Unrecognized tag: "item"]BoundingBox (axis-aligned, ordered coords of each edge are known)
Hence it's always LineWithCircle, never CircleWithLine. Static methodsbool | |
Checks for intersections between the two bounding boxes specified by the coordinates. Returns true if there is
at least one intersection. | bool | |
Checks for intersections between the two bounding boxes specified by the coordinates. Returns true if there is
at least one intersection. Coordinates ending with "1" belong to the first box, "2" to the second one.
Coordinates starting with "f" MUST be less than or equal to ones starting with "t". | PointD | |
Finds the point of intersection between two lines, specified by two points each.
If the lines coincide or are parallel, returns (NaN,NaN). | void | |
Finds the points of intersection between a line and a circle. The results are two lambdas along the line, one
for each point, or NaN if there is no intersection. | void | | PointD | |
Finds the point of intersection of two lines. If the lines don't intersect, the resulting point coordinates
are NaN. | void | |
Finds the point of intersection of two lines. The result is in terms of lambda along each of the lines. Point
of intersection is defined as "line.Start + lambda * line", for each line. If the lines don't intersect, the
lambdas are set to NaN. | ValueTuple<PointD, double, double> | | PolygonD | | Returns a polygon formed by intersecting an arbitrary polygon with a convex polygon. | void | |
Finds the points of intersection between a ray and an arc. The resulting lambdas along the ray are sorted in
ascending order, so the "first" intersection is always in lambda1 (if any). Lambda may be NaN if there is no
intersection (or no "second" intersection). | bool | |
Checks for intersections between a ray and a bounding box. Returns true if there is at least one intersection. | void | |
Finds the points of intersection between a ray and a circle. The resulting lambdas along the ray are sorted in
ascending order, so the "first" intersection is always in lambda1 (if any). Lambda may be NaN if there is no
intersection (or no "second" intersection). | void | |
Finds intersections between a ray and a rectangle. Returns the lambdas of intersections, if any, or NaN
otherwise. Guarantees that lambda1 < lambda2, and if only one of them is NaN then it's lambda2. Lambda is
such that ray.Start + lambda * (ray.End - ray.Start) gives the point of intersection. | void | |
Calculates the intersection of a ray with a segment. Returns the result as the lambdas of the intersection
point along the ray and the segment. If there is no intersection returns double.NaN in both lambdas. | bool | SegmentWithSegment(double f1x, double f1y, double t1x, double t1y, double f2x, double f2y, double t2x, double t2y) |
If the two specified line segments touch anywhere, returns true. Otherwise returns false. See Remarks. |
|