Class AbstractGreatArcConnector
java.lang.Object
org.apache.commons.geometry.euclidean.internal.AbstractPathConnector<AbstractGreatArcConnector.ConnectableGreatArc>
org.apache.commons.geometry.spherical.twod.AbstractGreatArcConnector
- Direct Known Subclasses:
InteriorAngleGreatArcConnector
public abstract class AbstractGreatArcConnector
extends AbstractPathConnector<AbstractGreatArcConnector.ConnectableGreatArc>
Abstract class for joining collections of great arcs into connected
paths. This class is not thread-safe.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
Internal class for connectingGreatArc
s intoGreatArcPath
s.Nested classes/interfaces inherited from class org.apache.commons.geometry.euclidean.internal.AbstractPathConnector
AbstractPathConnector.ConnectableElement<E extends AbstractPathConnector.ConnectableElement<E>>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a collection of arcs to the connector, leaving them unconnected until a later call toconnect(Iterable)
orconnectAll()
.void
Add an arc to the connector, leaving it unconnected until a later call to toconnect(Iterable)
orconnectAll()
.void
Add a collection of arcs to the connector and attempt to connect each new arc with existing ones.Connect all current arcs into connected paths, returning the result as a list of arc paths.connectAll
(Iterable<GreatArc> arcs) Add the given arcs to this instance and connect all current arc into paths.private GreatArcPath
Convert the linked list of path elements starting at the argument into aGreatArcPath
.Methods inherited from class org.apache.commons.geometry.euclidean.internal.AbstractPathConnector
addPathElement, computePathRoots, connectPathElements, selectConnection, selectPointConnection
-
Constructor Details
-
AbstractGreatArcConnector
public AbstractGreatArcConnector()
-
-
Method Details
-
add
Add an arc to the connector, leaving it unconnected until a later call to toconnect(Iterable)
orconnectAll()
.- Parameters:
arc
- arc to add- See Also:
-
add
Add a collection of arcs to the connector, leaving them unconnected until a later call toconnect(Iterable)
orconnectAll()
.- Parameters:
arcs
- arcs to add- See Also:
-
connect
Add a collection of arcs to the connector and attempt to connect each new arc with existing ones. Connections made at this time will not be overwritten by subsequent calls to this or other connection methods, (eg,connectAll()
).The connector is not reset by this call. Additional arc can still be added to the current set of paths.
- Parameters:
arcs
- arcs to connect- See Also:
-
connectAll
Add the given arcs to this instance and connect all current arc into paths. This call is equivalent toconnector.add(arcs); List<GreatArcPath> result = connector.connectAll();
The connector is reset after this call. Further calls to add or connect arcs will result in new paths being generated.
- Parameters:
arcs
- arcs to add- Returns:
- the connected arc paths
- See Also:
-
connectAll
Connect all current arcs into connected paths, returning the result as a list of arc paths.The connector is reset after this call. Further calls to add or connect arcs will result in new paths being generated.
- Returns:
- the connected line segments paths
-
toPath
Convert the linked list of path elements starting at the argument into aGreatArcPath
.- Parameters:
root
- root of a connected path linked list- Returns:
- a great arc path representing the linked list path
-