public final class EmbeddedTreeLineSubset extends LineSubset
RegionBSPTree1D.
This class can represent convex, non-convex, finite, infinite, and empty regions.
This class is mutable and not thread safe.
| Constructor and Description |
|---|
EmbeddedTreeLineSubset(Line line)
Construct a new, empty subset for the given line.
|
EmbeddedTreeLineSubset(Line line,
boolean full)
Construct a new subset for the given line.
|
EmbeddedTreeLineSubset(Line line,
RegionBSPTree1D region)
Construct a new instance from its defining line and subspace region.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(EmbeddedTreeLineSubset subset)
Add the region represented by the given line subset to this instance.
|
void |
add(LineConvexSubset subset)
Add a line subset to this instance.
|
Vector2D |
closest(Vector2D pt) |
Bounds2D |
getBounds()
Get a
Bounds2D object defining an axis-aligned bounding box containing all
vertices for this subset. |
Vector2D |
getCentroid() |
double |
getSize() |
RegionBSPTree1D |
getSubspaceRegion() |
boolean |
isEmpty() |
boolean |
isFull() |
Split<EmbeddedTreeLineSubset> |
split(Hyperplane<Vector2D> splitter) |
List<LineConvexSubset> |
toConvex() |
String |
toString() |
EmbeddedTreeLineSubset |
transform(Transform<Vector2D> transform) |
classify, getHyperplane, getLine, getPrecision, intersection, intersection, toSpace, toSubspaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcontainsisFinite, isInfinitetoSpace, toSubspacepublic EmbeddedTreeLineSubset(Line line)
line - line defining the subsetpublic EmbeddedTreeLineSubset(Line line, boolean full)
full
is true, then the subset will cover the entire line; otherwise,
it will be empty.line - line defining the subsetfull - if true, the subset will cover the entire space;
otherwise it will be emptypublic EmbeddedTreeLineSubset(Line line, RegionBSPTree1D region)
line - line defining the subsetregion - subspace region for the instancepublic boolean isFull()
public boolean isEmpty()
public double getSize()
public Vector2D getCentroid()
public Bounds2D getBounds()
Bounds2D object defining an axis-aligned bounding box containing all
vertices for this subset. Null is returned if the subset is infinite or does not
contain any vertices.getBounds in class LineSubsetpublic EmbeddedTreeLineSubset transform(Transform<Vector2D> transform)
public List<LineConvexSubset> toConvex()
toConvex in interface HyperplaneSubset<Vector2D>toConvex in class LineSubsetpublic RegionBSPTree1D getSubspaceRegion()
getSubspaceRegion in interface RegionEmbedding<Vector2D,Vector1D>getSubspaceRegion in class LineSubsetpublic Split<EmbeddedTreeLineSubset> split(Hyperplane<Vector2D> splitter)
In all cases, the current instance is not modified. However, In order to avoid
unnecessary copying, this method will use the current instance as the split value when
the instance lies entirely on the plus or minus side of the splitter. For example, if
this instance lies entirely on the minus side of the splitter, the subplane
returned by Split.getMinus() will be this instance. Similarly, Split.getPlus()
will return the current instance if it lies entirely on the plus side. Callers need to make
special note of this, since this class is mutable.
public void add(LineConvexSubset subset)
subset - the line subset to addIllegalArgumentException - if the given line subset is not from
a line equivalent to this instancepublic void add(EmbeddedTreeLineSubset subset)
subset - line subset to addIllegalArgumentException - if the given line subset is not from
a line equivalent to this instanceCopyright © 2016–2021 The Apache Software Foundation. All rights reserved.