Class InteriorAngleLinePathConnector.Minimize
- 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.Minimize
-
- Enclosing class:
- InteriorAngleLinePathConnector
public static final class InteriorAngleLinePathConnector.Minimize extends InteriorAngleLinePathConnector
Implementation ofInteriorAngleLinePathConnector
that chooses line subset connections that produce the smallest 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 left 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 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.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
-
-
-
-
Method Detail
-
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
-
-