public final class RegionBSPTree3D extends AbstractRegionBSPTree<Vector3D,RegionBSPTree3D.RegionNode3D> implements BoundarySource3D
| Modifier and Type | Class and Description |
|---|---|
static class |
RegionBSPTree3D.PartitionedRegionBuilder3D
Class used to build regions in Euclidean 3D space by inserting boundaries into a BSP
tree containing "partitions", i.e.
|
static class |
RegionBSPTree3D.RegionNode3D
BSP tree node for three dimensional Euclidean space.
|
AbstractRegionBSPTree.AbstractRegionNode<P extends Point<P>,N extends AbstractRegionBSPTree.AbstractRegionNode<P,N>>, AbstractRegionBSPTree.BoundaryProjector<P extends Point<P>,N extends AbstractRegionBSPTree.AbstractRegionNode<P,N>>, AbstractRegionBSPTree.RegionSizeProperties<P extends Point<P>>AbstractBSPTree.AbstractNode<P extends Point<P>,N extends AbstractBSPTree.AbstractNode<P,N>>, AbstractBSPTree.SubtreeInitializer<N extends AbstractBSPTree.AbstractNode<?,?>>BSPTree.FindNodeCutRule, BSPTree.Node<P extends Point<P>,N extends BSPTree.Node<P,N>>| Constructor and Description |
|---|
RegionBSPTree3D()
Create a new, empty region.
|
RegionBSPTree3D(boolean full)
Create a new region.
|
| Modifier and Type | Method and Description |
|---|---|
Iterable<PlaneConvexSubset> |
boundaries() |
Stream<PlaneConvexSubset> |
boundaryStream() |
protected AbstractRegionBSPTree.RegionSizeProperties<Vector3D> |
computeRegionSizeProperties() |
RegionBSPTree3D |
copy()
Return a deep copy of this instance.
|
protected RegionBSPTree3D.RegionNode3D |
createNode() |
static RegionBSPTree3D |
empty()
Return a new, empty instance.
|
static RegionBSPTree3D |
from(Iterable<? extends PlaneConvexSubset> boundaries)
Construct a new tree from the given boundaries.
|
static RegionBSPTree3D |
from(Iterable<? extends PlaneConvexSubset> boundaries,
boolean full)
Construct a new tree from the given boundaries.
|
static RegionBSPTree3D |
full()
Return a new instance containing all of 3D space.
|
List<PlaneConvexSubset> |
getBoundaries() |
List<LinecastPoint3D> |
linecast(LineConvexSubset3D subset)
Intersect the given line convex subset against the boundaries in this instance, returning
a list of all intersections in order of increasing distance along the line.
|
LinecastPoint3D |
linecastFirst(LineConvexSubset3D subset)
Intersect the given line convex subset against the boundaries in this instance, returning
the first intersection found when traveling in the direction of the line subset from its
start point.
|
static RegionBSPTree3D.PartitionedRegionBuilder3D |
partitionedRegionBuilder()
Create a new
RegionBSPTree3D.PartitionedRegionBuilder3D instance which can be used to build balanced
BSP trees from region boundaries. |
Vector3D |
project(Vector3D pt) |
Split<RegionBSPTree3D> |
split(Hyperplane<Vector3D> splitter) |
List<ConvexVolume> |
toConvex()
Return a list of
ConvexVolumes representing the same region
as this instance. |
RegionBSPTree3D |
toTree()
Return the current instance.
|
classify, complement, complement, condense, copyNodeProperties, createBoundaryIterable, createBoundaryList, difference, difference, getBoundarySize, getCentroid, getRegionSizeProperties, getSize, getSubtreeInitializer, insert, insert, insert, insert, insert, insert, insert, insert, intersection, intersection, invalidate, isEmpty, isFull, setEmpty, setFull, split, union, union, xor, xoraccept, accept, copy, copyNode, copySubtree, count, cutNode, extract, extractParentPath, findNode, findNode, getRoot, getVersion, height, importSubtree, insert, nodes, removeNodeCut, setNodeCut, setRoot, splitIntoTrees, splitSubtree, swapsInsideOutside, toString, transform, treeString, treeString, trimToNodeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBounds, of, of, toList, toTriangleMesh, triangleStreamlinecast, linecastFirstisFinite, isInfinitepublic RegionBSPTree3D()
public RegionBSPTree3D(boolean full)
full is true, then the region will
represent the entire 3D space. Otherwise, it will be empty.full - whether or not the region should contain the entire
3D space or be emptypublic RegionBSPTree3D copy()
AbstractBSPTree.copy(org.apache.commons.geometry.core.partitioning.bsp.BSPTree)public Iterable<PlaneConvexSubset> boundaries()
boundaries in class AbstractRegionBSPTree<Vector3D,RegionBSPTree3D.RegionNode3D>public Stream<PlaneConvexSubset> boundaryStream()
boundaryStream in interface BoundarySource<PlaneConvexSubset>public List<PlaneConvexSubset> getBoundaries()
getBoundaries in class AbstractRegionBSPTree<Vector3D,RegionBSPTree3D.RegionNode3D>public List<ConvexVolume> toConvex()
ConvexVolumes representing the same region
as this instance. One convex volume is returned for each interior leaf
node in the tree.public Split<RegionBSPTree3D> split(Hyperplane<Vector3D> splitter)
split in interface Splittable<Vector3D,HyperplaneBoundedRegion<Vector3D>>public Vector3D project(Vector3D pt)
project in interface Region<Vector3D>project in class AbstractRegionBSPTree<Vector3D,RegionBSPTree3D.RegionNode3D>public RegionBSPTree3D toTree()
toTree in interface BoundarySource3DpartitionedRegionBuilder()public List<LinecastPoint3D> linecast(LineConvexSubset3D subset)
linecast in interface BoundarySource3Dlinecast in interface Linecastable3Dsubset - line subset to intersectpublic LinecastPoint3D linecastFirst(LineConvexSubset3D subset)
linecastFirst in interface BoundarySource3DlinecastFirst in interface Linecastable3Dsubset - line subset to intersectprotected AbstractRegionBSPTree.RegionSizeProperties<Vector3D> computeRegionSizeProperties()
computeRegionSizeProperties in class AbstractRegionBSPTree<Vector3D,RegionBSPTree3D.RegionNode3D>protected RegionBSPTree3D.RegionNode3D createNode()
createNode in class AbstractBSPTree<Vector3D,RegionBSPTree3D.RegionNode3D>public static RegionBSPTree3D full()
public static RegionBSPTree3D empty()
public static RegionBSPTree3D from(Iterable<? extends PlaneConvexSubset> boundaries)
boundaries - boundaries to construct the tree fromfrom(Iterable, boolean)public static RegionBSPTree3D from(Iterable<? extends PlaneConvexSubset> boundaries, boolean full)
full is true, then
the initial tree before boundary insertion contains the entire space. Otherwise,
it is empty.boundaries - boundaries to construct the tree fromfull - if true, the initial tree will contain the entire spacepublic static RegionBSPTree3D.PartitionedRegionBuilder3D partitionedRegionBuilder()
RegionBSPTree3D.PartitionedRegionBuilder3D instance which can be used to build balanced
BSP trees from region boundaries.RegionBSPTree3D.PartitionedRegionBuilder3D instanceCopyright © 2016–2021 The Apache Software Foundation. All rights reserved.