public interface Shape extends GeometricObject2d, Cloneable
| Modifier and Type | Method and Description | 
|---|---|
Polygon | 
asPolygon()
Convert the shape to a polygon representation 
 | 
double | 
calculateArea()
Calculate the area of the shape 
 | 
double | 
calculatePerimeter()
Calculate the perimeter of the shape 
 | 
Shape | 
clone()  | 
double | 
intersectionArea(Shape that)
Calls  
Polygon.intersectionArea(Shape, int) with 1 step per pixel
 dimension. | 
double | 
intersectionArea(Shape that,
                int nStepsPerDimension)
Return an estimate for the area of the intersection of this polygon and
 another polygon. 
 | 
boolean | 
isConvex()
Test if the shape is convex. 
 | 
boolean | 
isInside(Point2d point)
Test whether the point p is inside the shape. 
 | 
RotatedRectangle | 
minimumBoundingRectangle()
Compute the minimum size rotated bounding rectangle that contains this
 shape. 
 | 
Shape | 
transform(Jama.Matrix transform)
Apply a 3x3 transform matrix to a copy of the  
GeometricObject2d and
 return it | 
calculateCentroid, calculateRegularBoundingBox, getHeight, getWidth, maxX, maxY, minX, minY, scale, scale, scaleCentroid, translateboolean isInside(Point2d point)
point - the pointdouble calculateArea()
double calculatePerimeter()
Polygon asPolygon()
double intersectionArea(Shape that)
Polygon.intersectionArea(Shape, int) with 1 step per pixel
 dimension. Subsequently this function returns the shared whole pixels of
 this polygon and that.that - double intersectionArea(Shape that, int nStepsPerDimension)
that - nStepsPerDimension - RotatedRectangle minimumBoundingRectangle()
boolean isConvex()
Shape transform(Jama.Matrix transform)
GeometricObject2dGeometricObject2d and
 return ittransform in interface GeometricObject2dtransform - 3x3 transform matrix