public final class RotatingCalipers extends Object
Modified to only use radians for angles and fit better within the OpenIMAJ geometry classes.
Modifier and Type | Class and Description |
---|---|
protected static class |
RotatingCalipers.Caliper |
protected static class |
RotatingCalipers.Corner |
Constructor and Description |
---|
RotatingCalipers() |
Modifier and Type | Method and Description |
---|---|
protected static int |
getIndex(Polygon convexHull,
RotatingCalipers.Corner corner) |
static RotatedRectangle |
getMinimumBoundingRectangle(Polygon poly,
boolean assumeSimple)
Use the rotating calipers algorithm to optimally find the minimum sized
rotated rectangle that encompasses the outer shell of the given polygon.
|
public RotatingCalipers()
public static RotatedRectangle getMinimumBoundingRectangle(Polygon poly, boolean assumeSimple)
poly
- the polygonassumeSimple
- can the algorithm assume the polygon is simple and use an
optimised (Melkman's) convex hull?protected static int getIndex(Polygon convexHull, RotatingCalipers.Corner corner)