Class InteriorAngleGreatArcConnector.Minimize
- java.lang.Object
-
- org.apache.commons.geometry.euclidean.internal.AbstractPathConnector<AbstractGreatArcConnector.ConnectableGreatArc>
-
- org.apache.commons.geometry.spherical.twod.AbstractGreatArcConnector
-
- org.apache.commons.geometry.spherical.twod.InteriorAngleGreatArcConnector
-
- org.apache.commons.geometry.spherical.twod.InteriorAngleGreatArcConnector.Minimize
-
- Enclosing class:
- InteriorAngleGreatArcConnector
public static class InteriorAngleGreatArcConnector.Minimize extends InteriorAngleGreatArcConnector
Implementation ofInteriorAngleGreatArcConnector
that chooses arc connections that produce the smallest interior angles. Another way to visualize this is that when presented multiple connection options for a given arc, this class will choose the option that points most to the left when viewed in the direction of the incoming arc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.commons.geometry.spherical.twod.InteriorAngleGreatArcConnector
InteriorAngleGreatArcConnector.Maximize, InteriorAngleGreatArcConnector.Minimize
-
Nested classes/interfaces inherited from class org.apache.commons.geometry.spherical.twod.AbstractGreatArcConnector
AbstractGreatArcConnector.ConnectableGreatArc
-
Nested classes/interfaces inherited from class org.apache.commons.geometry.euclidean.internal.AbstractPathConnector
AbstractPathConnector.ConnectableElement<E extends AbstractPathConnector.ConnectableElement<E>>
-
-
Constructor Summary
Constructors Constructor Description Minimize()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
isBetterAngle(double newAngle, double previousAngle)
Return true ifnewAngle
represents a better interior angle thanpreviousAngle
.-
Methods inherited from class org.apache.commons.geometry.spherical.twod.InteriorAngleGreatArcConnector
connectMaximized, connectMinimized, selectConnection
-
Methods inherited from class org.apache.commons.geometry.spherical.twod.AbstractGreatArcConnector
add, add, connect, connectAll, connectAll
-
Methods inherited from class org.apache.commons.geometry.euclidean.internal.AbstractPathConnector
addPathElement, computePathRoots, connectPathElements, selectPointConnection
-
-
-
-
Method Detail
-
isBetterAngle
protected boolean isBetterAngle(double newAngle, double previousAngle)
Return true ifnewAngle
represents a better interior angle thanpreviousAngle
.- Specified by:
isBetterAngle
in classInteriorAngleGreatArcConnector
- Parameters:
newAngle
- the new angle under considerationpreviousAngle
- the previous best angle- Returns:
- true if
newAngle
represents a better interior angle thanpreviousAngle
-
-