public interface Linecastable2D
Linecasting is a process that takes a line or convex line subset and intersects it with the boundaries of a region. This is similar to raycasting used for collision detection with the exception that the intersecting element can be a line or convex line subset and not just a ray.
Modifier and Type | Method and Description |
---|---|
default List<LinecastPoint2D> |
linecast(Line line)
Intersect the given line against the boundaries in this instance, returning a
list of all intersections in order of increasing position along the line.
|
List<LinecastPoint2D> |
linecast(LineConvexSubset subset)
Intersect the given line subset against the boundaries in this instance, returning
a list of all intersections in order of increasing position along the line.
|
default LinecastPoint2D |
linecastFirst(Line line)
Intersect the given line against the boundaries in this instance, returning
the first intersection found when traveling in the direction of the line from
infinity.
|
LinecastPoint2D |
linecastFirst(LineConvexSubset subset)
Intersect the given line subset against the boundaries in this instance, returning
the first intersection found when traveling in the direction of the line subset
from its start location.
|
default List<LinecastPoint2D> linecast(Line line)
line
- line the line to intersectList<LinecastPoint2D> linecast(LineConvexSubset subset)
subset
- line subset to intersectdefault LinecastPoint2D linecastFirst(Line line)
line
- the line to intersectLinecastPoint2D linecastFirst(LineConvexSubset subset)
subset
- line subset to intersectCopyright © 2016–2021 The Apache Software Foundation. All rights reserved.