intersectUnboundedLine Method
Intersect this ray with the unbounded line defined by the given points.
intersectUnboundedLine(linePointA: Point2d, linePointB: Point2d): { cross: number, fraction: number, hasIntersection: boolean }
@returns object with named values:
hasIntersection
: whether the intersection exists.fraction
: ray parameter of intersection, or 0.0 if!hasIntersection
. If the instance is normalized, this is the signed distance along the ray to the intersection point.cross
: the 2D cross productthis.direction x (linePointB - linePointA)
, useful for determining orientation of the line and ray.
Parameter | Type | Description |
---|---|---|
linePointA | Point2d | start of the line |
linePointB | Point2d | end of the line |
Returns - { cross: number, fraction: number, hasIntersection: boolean }
object with named values:
hasIntersection
: whether the intersection exists.fraction
: ray parameter of intersection, or 0.0 if!hasIntersection
. If the instance is normalized, this is the signed distance along the ray to the intersection point.cross
: the 2D cross productthis.direction x (linePointB - linePointA)
, useful for determining orientation of the line and ray.
Defined in
- geometry3d/Ray2d.ts Line 124
Last Updated: 23 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.