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.MinimizeNested classes/interfaces inherited from class org.apache.commons.geometry.euclidean.twod.path.AbstractLinePathConnector
AbstractLinePathConnector.ConnectableLineSubsetNested 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 booleanisBetterAngle(double newAngle, double previousAngle) Return true ifnewAnglerepresents a better interior angle thanpreviousAngle.Methods inherited from class org.apache.commons.geometry.euclidean.twod.path.InteriorAngleLinePathConnector
connectMaximized, connectMinimized, selectConnectionMethods inherited from class org.apache.commons.geometry.euclidean.twod.path.AbstractLinePathConnector
add, add, connect, connectAll, connectAllMethods 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 ifnewAnglerepresents a better interior angle thanpreviousAngle.- Specified by:
isBetterAnglein classInteriorAngleLinePathConnector- Parameters:
newAngle- the new angle under considerationpreviousAngle- the previous best angle- Returns:
- true if
newAnglerepresents a better interior angle thanpreviousAngle
-