Class InteriorAngleLinePathConnector.Maximize
java.lang.Object
org.apache.commons.geometry.euclidean.internal.AbstractPathConnector<AbstractLinePathConnector.ConnectableLineSubset>
org.apache.commons.geometry.euclidean.twod.path.AbstractLinePathConnector
org.apache.commons.geometry.euclidean.twod.path.InteriorAngleLinePathConnector
org.apache.commons.geometry.euclidean.twod.path.InteriorAngleLinePathConnector.Maximize
- Enclosing class:
InteriorAngleLinePathConnector
public static final class InteriorAngleLinePathConnector.Maximize
extends InteriorAngleLinePathConnector
Implementation of
InteriorAngleLinePathConnector
that chooses line subset
connections that produce the largest interior angles. Another way to visualize this is
that when presented multiple connection options for a given line subset, this class will
choose the option that points most to the right when viewed in the direction of the incoming
line subset.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.commons.geometry.euclidean.twod.path.InteriorAngleLinePathConnector
InteriorAngleLinePathConnector.Maximize, InteriorAngleLinePathConnector.Minimize
Nested classes/interfaces inherited from class org.apache.commons.geometry.euclidean.twod.path.AbstractLinePathConnector
AbstractLinePathConnector.ConnectableLineSubset
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 TypeMethodDescriptionprotected boolean
isBetterAngle
(double newAngle, double previousAngle) Return true ifnewAngle
represents a better interior angle thanpreviousAngle
.Methods inherited from class org.apache.commons.geometry.euclidean.twod.path.InteriorAngleLinePathConnector
connectMaximized, connectMinimized, selectConnection
Methods inherited from class org.apache.commons.geometry.euclidean.twod.path.AbstractLinePathConnector
add, add, connect, connectAll, connectAll
Methods inherited from class org.apache.commons.geometry.euclidean.internal.AbstractPathConnector
addPathElement, computePathRoots, connectPathElements, selectPointConnection
-
Constructor Details
-
Maximize
public Maximize()
-
-
Method Details
-
isBetterAngle
protected boolean isBetterAngle(double newAngle, double previousAngle) Return true ifnewAngle
represents a better interior angle thanpreviousAngle
.- Specified by:
isBetterAngle
in classInteriorAngleLinePathConnector
- Parameters:
newAngle
- the new angle under considerationpreviousAngle
- the previous best angle- Returns:
- true if
newAngle
represents a better interior angle thanpreviousAngle
-