math.geom2d.polygon
Interface PolygonalShape2D

All Superinterfaces:
Domain2D, java.awt.Shape, Shape2D
All Known Implementing Classes:
Box2D, HRectangle2D, MultiPolygon2D, Polygon2D, Rectangle2D

public interface PolygonalShape2D
extends Domain2D

Represent any class made of a finite set of simply connected edges. This class can be specialized in General Polygons, Polygon2D, which is a simple polygon, or more specialized shapes (square, rhombus...)


Field Summary
 
Fields inherited from interface math.geom2d.Shape2D
ACCURACY, defaultClipWindow, EMPTY_SET
 
Method Summary
 java.util.Collection<LineSegment2D> getEdges()
          Return the edges as line segments of the polygon
 java.util.Collection<Point2D> getVertices()
          Return the vertices (singular points) of the polygon
 int getVerticesNumber()
          Return the number of vertices of the polygon
 PolygonalShape2D transform(AffineTransform2D trans)
          Return the new Polygon created by an affine transform of this polygon.
 
Methods inherited from interface math.geom2d.curve.Domain2D
getBoundary
 
Methods inherited from interface math.geom2d.Shape2D
clip, getBoundingBox, getDistance, getDistance, isBounded
 
Methods inherited from interface java.awt.Shape
contains, contains, contains, contains, getBounds, getBounds2D, getPathIterator, getPathIterator, intersects, intersects
 

Method Detail

getVertices

java.util.Collection<Point2D> getVertices()
Return the vertices (singular points) of the polygon


getVerticesNumber

int getVerticesNumber()
Return the number of vertices of the polygon


getEdges

java.util.Collection<LineSegment2D> getEdges()
Return the edges as line segments of the polygon


transform

PolygonalShape2D transform(AffineTransform2D trans)
Return the new Polygon created by an affine transform of this polygon.

Specified by:
transform in interface Shape2D
Parameters:
trans - an affine transform
Returns:
the transformed shape