public interface BoundarySource2D extends BoundarySource<LineConvexSubset>, Linecastable2D
BoundarySource
interface for Euclidean 2D space.Modifier and Type | Method and Description |
---|---|
default Bounds2D |
getBounds()
Get a
Bounds2D object defining the axis-aligned box containing all vertices
in the boundaries for this instance. |
default 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(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.
|
static BoundarySource2D |
of(Collection<LineConvexSubset> boundaries)
Return a
BoundarySource2D instance containing the given boundaries. |
static BoundarySource2D |
of(LineConvexSubset... boundaries)
Return a
BoundarySource2D instance containing the given boundaries. |
default BoundaryList2D |
toList()
Return a
BoundaryList2D containing the boundaries in this instance. |
default RegionBSPTree2D |
toTree()
Return a BSP tree constructed from the boundaries contained in this instance.
|
boundaryStream
linecast, linecastFirst
default BoundaryList2D toList()
BoundaryList2D
containing the boundaries in this instance.BoundaryList2D
containing the boundaries in this instancedefault RegionBSPTree2D toTree()
RegionBSPTree2D.PartitionedRegionBuilder2D
.RegionBSPTree2D.partitionedRegionBuilder()
default List<LinecastPoint2D> linecast(LineConvexSubset subset)
linecast
in interface Linecastable2D
subset
- line subset to intersectdefault LinecastPoint2D linecastFirst(LineConvexSubset subset)
linecastFirst
in interface Linecastable2D
subset
- line subset to intersectdefault Bounds2D getBounds()
Bounds2D
object defining the axis-aligned box containing all vertices
in the boundaries for this instance. Null is returned if any boundaries are infinite
or no vertices were found.static BoundarySource2D of(LineConvexSubset... boundaries)
BoundarySource2D
instance containing the given boundaries.boundaries
- line subsets to include in the boundary sourcestatic BoundarySource2D of(Collection<LineConvexSubset> boundaries)
BoundarySource2D
instance containing the given boundaries. The given
collection is used directly as the source of the line subsets; no copy is made.boundaries
- line subsets to include in the boundary sourceCopyright © 2016–2021 The Apache Software Foundation. All rights reserved.