public class ConvexVolume extends AbstractConvexHyperplaneBoundedRegion<Vector3D,PlaneConvexSubset> implements BoundarySource3D
AbstractConvexHyperplaneBoundedRegion.ConvexRegionBoundaryBuilder<P extends Point<P>,S extends HyperplaneConvexSubset<P>>
Modifier | Constructor and Description |
---|---|
protected |
ConvexVolume(List<PlaneConvexSubset> boundaries)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
Stream<PlaneConvexSubset> |
boundaryStream() |
static ConvexVolume |
fromBounds(Iterable<? extends Plane> boundingPlanes)
Create a convex volume formed by the intersection of the negative half-spaces of the
given bounding planes.
|
static ConvexVolume |
fromBounds(Plane... planes)
Create a convex volume formed by the intersection of the negative half-spaces of the
given bounding planes.
|
static ConvexVolume |
full()
Return an instance representing the full 3D volume.
|
Vector3D |
getCentroid() |
double |
getSize() |
Split<ConvexVolume> |
split(Hyperplane<Vector3D> splitter) |
RegionBSPTree3D |
toTree()
Return a BSP tree constructed from the boundaries contained in this instance.
|
ConvexVolume |
transform(Transform<Vector3D> transform)
Return a new instance transformed by the argument.
|
PlaneConvexSubset |
trim(HyperplaneConvexSubset<Vector3D> convexSubset) |
classify, getBoundaries, getBoundarySize, isEmpty, isFull, project, splitInternal, swapsInsideOutside, toString, transformInternal
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBounds, linecast, linecastFirst, of, of, toList, toTriangleMesh, triangleStream
linecast, linecastFirst
isFinite, isInfinite
protected ConvexVolume(List<PlaneConvexSubset> boundaries)
boundaries
- the boundaries of the convex areapublic Stream<PlaneConvexSubset> boundaryStream()
boundaryStream
in interface BoundarySource<PlaneConvexSubset>
public Vector3D getCentroid()
getCentroid
in interface Region<Vector3D>
public Split<ConvexVolume> split(Hyperplane<Vector3D> splitter)
split
in interface Splittable<Vector3D,HyperplaneBoundedRegion<Vector3D>>
public RegionBSPTree3D toTree()
RegionBSPTree3D.PartitionedRegionBuilder3D
.toTree
in interface BoundarySource3D
RegionBSPTree3D.partitionedRegionBuilder()
public PlaneConvexSubset trim(HyperplaneConvexSubset<Vector3D> convexSubset)
trim
in class AbstractConvexHyperplaneBoundedRegion<Vector3D,PlaneConvexSubset>
public ConvexVolume transform(Transform<Vector3D> transform)
transform
- transform to applypublic static ConvexVolume full()
public static ConvexVolume fromBounds(Plane... planes)
planes
- planes used to define the convex areaIllegalArgumentException
- if the given set of bounding planes do not form a convex volume,
meaning that there is no region that is on the minus side of all of the bounding planes.public static ConvexVolume fromBounds(Iterable<? extends Plane> boundingPlanes)
boundingPlanes
- planes used to define the convex areaIllegalArgumentException
- if the given set of bounding planes do not form a convex volume,
meaning that there is no region that is on the minus side of all of the bounding planes.Copyright © 2016–2021 The Apache Software Foundation. All rights reserved.