Note that due to the wrapping around \(2 \pi\), barycenter is
ill-defined here. It was defined only in order to fulfill
the requirements of the Region
interface, but its use is discouraged.
| Modifier and Type | Class and Description |
|---|---|
| public static class | ArcsSet.
Specialized exception for inconsistent BSP tree state inconsistency. |
| public static class | ArcsSet.
Class holding the results of the |
| private class | ArcsSet.
Local iterator for sub-arcs. |
| Access | Constructor and Description |
|---|---|
| public | ArcsSet(final double
tolerance below which close sub-arcs are merged together tolerance)Build an arcs set representing the whole circle. |
| public | ArcsSet(final double
lower bound of the arc lower, final double upper bound of the arc upper, final double tolerance below which close sub-arcs are merged together tolerance)Build an arcs set corresponding to a single arc. |
| public | |
| public | ArcsSet(final Collection<SubHyperplane<Sphere1D>>
collection of boundary elements boundary, final double tolerance below which close sub-arcs are merged together tolerance)Build an arcs set from a Boundary REPresentation (B-rep). |
| Modifier and Type | Method and Description |
|---|---|
| private void | addArcLimit(final BSPTree<Sphere1D>
BSP tree under construction tree, final double arc limit alpha, final boolean if true, the limit is the start of an arc isStart)Add an arc limit to a BSP tree under construction. |
| public List | |
| public ArcsSet | buildNew(final BSPTree<Sphere1D>
inside/outside BSP tree representing the new region tree)Implements abstract org. Implements org. Build a region using the instance as a prototype. |
| private static BSPTree | Returns: the built treelower angular bound of the arc lower, final double upper angular bound of the arc upper, final double tolerance below which close sub-arcs are merged together tolerance)Build an inside/outside tree representing a single arc. |
| private void | |
| private BSPTree | Returns: child node just after the internal nodeinternal node at which the sub-tree starts node)Find the child node just after an internal node. |
| private BSPTree | Returns: child node just before the internal nodeinternal node at which the sub-tree starts node)Find the child node just before an internal node. |
| protected void | computeGeometricalProperties()
Implements abstract org. Compute some geometrical properties. |
| private ArcsSet | Returns: split part (may be null)limit angles of the split part limits)Create a split part. |
| private double | |
| private BSPTree | Returns: smallest internal node (i.e. first after 0.0 radians, in trigonometric direction), or null if there are no internal nodes (i.e. the set is either empty or covers the full circle)Get the node corresponding to the first arc start. |
| private BSPTree | Returns: first leaf node (i.e. node corresponding to the region just after 0.0 radians)tree root root)Get the first leaf node of a tree. |
| private BSPTree | Returns: last leaf node (i.e. node corresponding to the region just before \( 2 \pi \) radians)tree root root)Get the last leaf node of a tree. |
| private boolean | Returns: true is the node has a parent end is after it in trigonometric orderchild node considered node)Check if a node is the child after its parent in trigonometric order. |
| private boolean | |
| private boolean | Returns: true if the node corresponds to the start angle of an arcinternal node to check node)Check if an internal node corresponds to the start angle of an arc. |
| private boolean | Returns: true is the node has a parent end is before it in trigonometric orderchild node considered node)Check if a node is the child before its parent in trigonometric order. |
| private boolean | |
| public Iterator | |
| private BSPTree | |
| private BSPTree | Returns: leaf node just before the internal nodeinternal node at which the sub-tree starts node)Find the leaf node just before an internal node. |
| private BSPTree | Returns: next internal node in trigonometric order, or null if this is the last internal nodecurrent internal node node)Get the next internal node. |
| private BSPTree | Returns: previous internal node in trigonometric order, or null if this is the first internal nodecurrent internal node node)Get the previous internal node. |
| public BoundaryProjection | projectToBoundary(final Point<Sphere1D>
point to check point)Overrides org. Implements org. Project a point on the boundary of the region. |
| public Side | side(final Arc
arc to check instance against arc)
Deprecated
as of 3.6, replaced with
split(Arc).
Compute the relative position of the instance with respect to an arc. |
| public ArcsSet. |
| ArcsSet | back to summary |
|---|---|
| public ArcsSet(final double tolerance) Build an arcs set representing the whole circle.
| |
| ArcsSet | back to summary |
|---|---|
| public ArcsSet(final double lower, final double upper, final double tolerance) throws NumberIsTooLargeException Build an arcs set corresponding to a single arc.
If either
| |
| ArcsSet | back to summary |
|---|---|
| public ArcsSet(final BSPTree<Sphere1D> tree, final double tolerance) throws InconsistentStateAt2PiWrapping Build an arcs set from an inside/outside BSP tree. The leaf nodes of the BSP tree must have a
| |
| ArcsSet | back to summary |
|---|---|
| public ArcsSet(final Collection<SubHyperplane<Sphere1D>> boundary, final double tolerance) throws InconsistentStateAt2PiWrapping Build an arcs set 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.
| |
| addArcLimit | back to summary |
|---|---|
| private void addArcLimit(final BSPTree<Sphere1D> tree, final double alpha, final boolean isStart) Add an arc limit to a BSP tree under construction. | |
| asList | back to summary |
|---|---|
| public List Build an ordered list of arcs representing the instance. This method builds this arcs set as an ordered list of
| |
| buildNew | back to summary |
|---|---|
| public ArcsSet buildNew(final BSPTree<Sphere1D> tree) Implements abstract org. Implements 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
| |
| buildTree | back to summary |
|---|---|
| private static BSPTree Build an inside/outside tree representing a single arc.
| |
| check2PiConsistency | back to summary |
|---|---|
| private void check2PiConsistency() throws InconsistentStateAt2PiWrapping Check consistency.
| |
| childAfter | back to summary |
|---|---|
| private BSPTree Find the child node just after an internal node. | |
| childBefore | back to summary |
|---|---|
| private BSPTree Find the child node just before an internal node. | |
| computeGeometricalProperties | back to summary |
|---|---|
| protected void computeGeometricalProperties() Implements abstract org. Doc from org. Compute some geometrical properties. The properties to compute are the barycenter and the size.
| |
| createSplitPart | back to summary |
|---|---|
| private ArcsSet createSplitPart(final List<Double> limits) Create a split part. As per construction, the list of limit angles is known to have an even number of entries, with start angles at even indices and end angles at odd indices. | |
| getAngle | back to summary |
|---|---|
| private double getAngle(final BSPTree<Sphere1D> node) Get the limit angle of an internal node. | |
| getFirstArcStart | back to summary |
|---|---|
| private BSPTree Get the node corresponding to the first arc start. | |
| getFirstLeaf | back to summary |
|---|---|
| private BSPTree Get the first leaf node of a tree. | |
| getLastLeaf | back to summary |
|---|---|
| private BSPTree Get the last leaf node of a tree. | |
| isAfterParent | back to summary |
|---|---|
| private boolean isAfterParent(final BSPTree<Sphere1D> node) Check if a node is the child after its parent in trigonometric order. | |
| isArcEnd | back to summary |
|---|---|
| private boolean isArcEnd(final BSPTree<Sphere1D> node) Check if an internal node corresponds to the end angle of an arc. | |
| isArcStart | back to summary |
|---|---|
| private boolean isArcStart(final BSPTree<Sphere1D> node) Check if an internal node corresponds to the start angle of an arc. | |
| isBeforeParent | back to summary |
|---|---|
| private boolean isBeforeParent(final BSPTree<Sphere1D> node) Check if a node is the child before its parent in trigonometric order. | |
| isDirect | back to summary |
|---|---|
| private boolean isDirect(final BSPTree<Sphere1D> node) Check if an internal node has a direct limit angle. | |
| iterator | back to summary |
|---|---|
| public Iterator Implements java. Doc from java. Returns an iterator over elements of type The iterator returns the limit angles pairs of sub-arcs in trigonometric order.
The iterator does not support the optional
| |
| leafAfter | back to summary |
|---|---|
| private BSPTree Find the leaf node just after an internal node. | |
| leafBefore | back to summary |
|---|---|
| private BSPTree Find the leaf node just before an internal node. | |
| nextInternalNode | back to summary |
|---|---|
| private BSPTree Get the next internal node. | |
| previousInternalNode | back to summary |
|---|---|
| private BSPTree Get the previous internal node. | |
| projectToBoundary | back to summary |
|---|---|
| public BoundaryProjection Overrides org. Implements org. Doc from org. Project a point on the boundary of the region.
| |
| side | back to summary |
|---|---|
| public Side side(final Arc arc)
Deprecated as of 3.6, replaced with Compute the relative position of the instance with respect to an arc.
The
| |
| split | back to summary |
|---|---|
| public ArcsSet. Split the instance in two parts by an arc. | |
This exception is thrown at ArcsSet construction time when the
inside/outside
state is not consistent at the 0, \(2 \pi \) crossing.
| Modifier and Type | Field and Description |
|---|---|
| private static final long | serialVersionUID
Hides org. |
| Access | Constructor and Description |
|---|---|
| public |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides org. Serializable UID. | |
| InconsistentStateAt2PiWrapping | back to summary |
|---|---|
| public InconsistentStateAt2PiWrapping() Simple constructor. | |
split method.
| Modifier and Type | Field and Description |
|---|---|
| private final ArcsSet | minus
Part of the arcs set on the minus side of the splitting arc. |
| private final ArcsSet | plus
Part of the arcs set on the plus side of the splitting arc. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public ArcsSet | Returns: part of the arcs set on the minus side of the splitting arcGet the part of the arcs set on the minus side of the splitting arc. |
| public ArcsSet | Returns: part of the arcs set on the plus side of the splitting arcGet the part of the arcs set on the plus side of the splitting arc. |
| public Side | Returns: Side#PLUS if only getPlus() returns non-null,
Side#MINUS if only getMinus() returns non-null,
Side#BOTH if both getPlus() and getMinus()
return non-null or Side#HYPER if both getPlus() and
getMinus() return nullGet the side of the split arc with respect to its splitter. |
| minus | back to summary |
|---|---|
| private final ArcsSet minus Part of the arcs set on the minus side of the splitting arc. | |
| plus | back to summary |
|---|---|
| private final ArcsSet plus Part of the arcs set on the plus side of the splitting arc. | |
| Split | back to summary |
|---|---|
| private Split(final ArcsSet plus, final ArcsSet minus) Build a Split from its parts. | |
| getMinus | back to summary |
|---|---|
| public ArcsSet getMinus() Get the part of the arcs set on the minus side of the splitting arc.
| |
| getPlus | back to summary |
|---|---|
| public ArcsSet getPlus() Get the part of the arcs set on the plus side of the splitting arc.
| |
| getSide | back to summary |
|---|---|
| public Side getSide() Get the side of the split arc with respect to its splitter.
| |
| Modifier and Type | Field and Description |
|---|---|
| private BSPTree | current
Current node. |
| private final BSPTree | firstStart
Start of the first arc. |
| private double[] | pending
Sub-arc no yet returned. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public double[] | |
| public void | remove()
Overrides default java. Removes from the underlying collection the last element returned by this iterator (optional operation). |
| private void |
| current | back to summary |
|---|---|
| private BSPTree<Sphere1D> current Current node. | |
| firstStart | back to summary |
|---|---|
| private final BSPTree<Sphere1D> firstStart Start of the first arc. | |
| pending | back to summary |
|---|---|
| private double[] pending Sub-arc no yet returned. | |
| SubArcsIterator | back to summary |
|---|---|
| pack-priv SubArcsIterator() Simple constructor. | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| next | back to summary |
|---|---|
| public double[] next() Implements java. Doc from java. Returns the next element in the iteration.
| |
| remove | back to summary |
|---|---|
| public void remove() Overrides default java. Doc from java. Removes from the underlying collection the last element returned
by this iterator (optional operation). This method can be called
only once per call to The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.
The behavior of an iterator is unspecified if this method is called
after a call to the | |
| selectPending | back to summary |
|---|---|
| private void selectPending() Walk the tree to select the pending sub-arc. | |