| Modifier and Type | Field and Description |
|---|---|
| private Point | barycenter
Barycenter. |
| private double | size
Size of the instance. |
| private final double | tolerance
Tolerance below which points are considered to belong to hyperplanes. |
| private BSPTree | tree
Inside/Outside BSP tree. |
| Access | Constructor and Description |
|---|---|
| protected | AbstractRegion(final double
tolerance below which points are considered identical. tolerance)Build a region representing the whole space. |
| protected | AbstractRegion(final BSPTree<S>
inside/outside BSP tree representing the region tree, final double tolerance below which points are considered identical. tolerance)Build a region from an inside/outside BSP tree. |
| protected | AbstractRegion(final Collection<SubHyperplane<S>>
collection of boundary elements, as a
collection of boundary, final double SubHyperplane objectstolerance below which points are considered identical. tolerance)Build a Region from a Boundary REPresentation (B-rep). |
| public | AbstractRegion(final Hyperplane<S>[]
array of bounding hyperplanes (if null, an
empty region will be built) hyperplanes, final double tolerance below which points are considered identical. tolerance)Build a convex region from an array of bounding hyperplanes. |
| Modifier and Type | Method and Description |
|---|---|
| public AbstractRegion | Returns: a new region, resulting from the application of the transform to the instancetransform to apply transform)Transform a region. |
| public abstract AbstractRegion | buildNew(BSPTree<S>
inside/outside BSP tree representing the new region newTree)Redeclares org. Build a region using the instance as a prototype. |
| public Region. | Returns: a code representing the point status: eitherRegion., Region. or
Region.point to check point)Check a point with respect to the region. |
| public Region. | checkPoint(final Point<S>
point to check point)Implements org. Check a point with respect to the region. |
| protected Region. | |
| protected Region. | |
| protected abstract void | |
| public boolean | contains(final Region<S>
region to check against the instance region)Implements org. Check if the instance entirely contains another region. |
| public AbstractRegion | copySelf()
Implements org. Copy the instance. |
| public Point | getBarycenter()
Implements org. Get the barycenter of the instance. |
| public double | getBoundarySize()
Implements org. Get the size of the boundary. |
| public double | getSize()
Implements org. Get the size of the instance. |
| public double | Returns: tolerance below which points are considered to belong to hyperplanesGet the tolerance below which points are considered to belong to hyperplanes. |
| public BSPTree | getTree(final boolean
if true, the boundary attributes
at internal nodes are guaranteed to be included (they may be
included even if the argument is false, if they have already been
computed due to a previous call) includeBoundaryAttributes)Implements org. Get the underlying BSP tree. |
| private void | insertCuts(final BSPTree<S>
current tree node (it is a leaf node at the beginning
of the call) node, final Collection<SubHyperplane<S>> collection of edges belonging to the cell defined
by the node boundary)Recursively build a tree by inserting cut sub-hyperplanes. |
| public SubHyperplane | intersection(final SubHyperplane<S>
sub-hyperplane traversing the region sub)Implements org. Get the parts of a sub-hyperplane that are contained in the region. |
| public boolean | isEmpty()
Implements org. Check if the instance is empty. |
| public boolean | isEmpty(final BSPTree<S>
root node of the sub-tree (must have node)Region tree semantics, i.e. the leaf nodes must have
Boolean attributes representing an inside/outside
property)Implements org. Check if the sub-tree starting at a given node is empty. |
| public boolean | isFull()
Implements org. Check if the instance covers the full space. |
| public boolean | isFull(final BSPTree<S>
root node of the sub-tree (must have node)Region tree semantics, i.e. the leaf nodes must have
Boolean attributes representing an inside/outside
property)Implements org. Check if the sub-tree starting at a given node covers the full space. |
| public BoundaryProjection | projectToBoundary(final Point<S>
point to check point)Implements org. Project a point on the boundary of the region. |
| private SubHyperplane | Returns: filtered sub-hyperplanecurrent BSP tree node node, final SubHyperplane<S> sub-hyperplane traversing the region sub)Recursively compute the parts of a sub-hyperplane that are contained in the region. |
| private BSPTree | |
| protected void | setBarycenter(final Vector<S>
barycenter of the instance barycenter)Set the barycenter of the instance. |
| protected void | setBarycenter(final Point<S>
barycenter of the instance barycenter)Set the barycenter of the instance. |
| protected void | |
| public Side | side(final Hyperplane<S>
reference hyperplane hyperplane)Implements org.
Deprecated
Compute the relative position of the instance with respect to an hyperplane. |
| barycenter | back to summary |
|---|---|
| private Point<S> barycenter Barycenter. | |
| size | back to summary |
|---|---|
| private double size Size of the instance. | |
| tolerance | back to summary |
|---|---|
| private final double tolerance Tolerance below which points are considered to belong to hyperplanes. | |
| tree | back to summary |
|---|---|
| private BSPTree<S> tree Inside/Outside BSP tree. | |
| AbstractRegion | back to summary |
|---|---|
| protected AbstractRegion(final double tolerance) Build a region representing the whole space.
| |
| AbstractRegion | back to summary |
|---|---|
| protected AbstractRegion(final BSPTree<S> tree, final double tolerance) Build a region from an inside/outside BSP tree. The leaf nodes of the BSP tree must have a
| |
| AbstractRegion | back to summary |
|---|---|
| protected AbstractRegion(final Collection<SubHyperplane<S>> boundary, final double tolerance) Build a Region from a Boundary REPresentation (B-rep). The boundary is provided as a collection of The boundary elements can be in any order, and can form
several non-connected sets (like for example polygons with holes
or a set of disjoints polyhedrons considered as a whole). In
fact, the elements do not even need to be connected together
(their topological connections are not used here). However, if the
boundary does not really separate an inside open from an outside
open (open having here its topological meaning), then subsequent
calls to the If the boundary is empty, the region will represent the whole space.
| |
| AbstractRegion | back to summary |
|---|---|
| public AbstractRegion(final Hyperplane<S>[] hyperplanes, final double tolerance) Build a convex region from an array of bounding hyperplanes.
| |
| applyTransform | back to summary |
|---|---|
| public AbstractRegion Transform a region. Applying a transform to a region consist in applying the transform to all the hyperplanes of the underlying BSP tree and of the boundary (and also to the sub-hyperplanes embedded in these hyperplanes) and to the barycenter. The instance is not modified, a new instance is built.
| |
| buildNew | back to summary |
|---|---|
| public abstract AbstractRegion Redeclares org. Doc from org. Build a region using the instance as a prototype. This method allow to create new instances without knowing exactly the type of the region. It is an application of the prototype design pattern. The leaf nodes of the BSP tree must have a
| |
| checkPoint | back to summary |
|---|---|
| public Region. Check a point with respect to the region.
| |
| checkPoint | back to summary |
|---|---|
| public Region. Implements org. Doc from org. Check a point with respect to the region.
| |
| checkPoint | back to summary |
|---|---|
| protected Region. Check a point with respect to the region starting at a given node. | |
| checkPoint | back to summary |
|---|---|
| protected Region. Check a point with respect to the region starting at a given node. | |
| computeGeometricalProperties | back to summary |
|---|---|
| protected abstract void computeGeometricalProperties() Compute some geometrical properties. The properties to compute are the barycenter and the size. | |
| contains | back to summary |
|---|---|
| public boolean contains(final Region<S> region) Implements org. Doc from org. Check if the instance entirely contains another region.
| |
| copySelf | back to summary |
|---|---|
| public AbstractRegion Implements org. Doc from org. Copy the instance. The instance created is completely independant of the original
one. A deep copy is used, none of the underlying objects are
shared (except for the underlying tree
| |
| getBarycenter | back to summary |
|---|---|
| public Point Implements org. Doc from org. Get the barycenter of the instance.
| |
| getBoundarySize | back to summary |
|---|---|
| public double getBoundarySize() Implements org. Doc from org. Get the size of the boundary.
| |
| getSize | back to summary |
|---|---|
| public double getSize() Implements org. Doc from org. Get the size of the instance.
| |
| getTolerance | back to summary |
|---|---|
| public double getTolerance() Get the tolerance below which points are considered to belong to hyperplanes.
| |
| getTree | back to summary |
|---|---|
| public BSPTree Implements org. Doc from org. Get the underlying BSP tree. Regions are represented by an underlying inside/outside BSP
tree whose leaf attributes are In addition to the leaf attributes, the internal nodes which
correspond to cells split by cut sub-hyperplanes may contain
Since computing the boundary is not always required and can be
time-consuming for large trees, these internal nodes attributes
are computed using lazy evaluation only when required by setting
the
| |
| insertCuts | back to summary |
|---|---|
| private void insertCuts(final BSPTree<S> node, final Collection<SubHyperplane<S>> boundary) Recursively build a tree by inserting cut sub-hyperplanes.
| |
| intersection | back to summary |
|---|---|
| public SubHyperplane Implements org. Doc from org. Get the parts of a sub-hyperplane that are contained in the region. The parts of the sub-hyperplane that belong to the boundary are not included in the resulting parts.
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Implements org. Doc from org. Check if the instance is empty.
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty(final BSPTree<S> node) Implements org. Doc from org. Check if the sub-tree starting at a given node is empty. | |
| isFull | back to summary |
|---|---|
| public boolean isFull() Implements org. Doc from org. Check if the instance covers the full space.
| |
| isFull | back to summary |
|---|---|
| public boolean isFull(final BSPTree<S> node) Implements org. Doc from org. Check if the sub-tree starting at a given node covers the full space. | |
| projectToBoundary | back to summary |
|---|---|
| public BoundaryProjection Implements org. Doc from org. Project a point on the boundary of the region.
| |
| recurseIntersection | back to summary |
|---|---|
| private SubHyperplane Recursively compute the parts of a sub-hyperplane that are contained in the region.
| |
| recurseTransform | back to summary |
|---|---|
| private BSPTree Recursively transform an inside/outside BSP-tree. | |
| setBarycenter | back to summary |
|---|---|
| protected void setBarycenter(final Vector<S> barycenter) Set the barycenter of the instance.
| |
| setBarycenter | back to summary |
|---|---|
| protected void setBarycenter(final Point<S> barycenter) Set the barycenter of the instance.
| |
| setSize | back to summary |
|---|---|
| protected void setSize(final double size) Set the size of the instance.
| |
| side | back to summary |
|---|---|
| public Side side(final Hyperplane<S> hyperplane) Implements org. Doc from org. Deprecated
Compute the relative position of the instance with respect to an hyperplane.
| |