|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectmath.geom2d.polygon.MultiPolygon2D
public class MultiPolygon2D
A polygonal domain whose boundary is composed of several disjoint continuous LinearRing2D.
| Field Summary |
|---|
| Fields inherited from interface math.geom2d.Shape2D |
|---|
ACCURACY |
| Constructor Summary | |
|---|---|
MultiPolygon2D()
|
|
MultiPolygon2D(Collection<LinearRing2D> lines)
|
|
MultiPolygon2D(LinearRing2D ring)
|
|
MultiPolygon2D(LinearRing2D[] rings)
|
|
MultiPolygon2D(SimplePolygon2D polygon)
|
|
| Method Summary | |
|---|---|
void |
addPolygon(SimplePolygon2D polygon)
|
void |
addPolyline(LinearRing2D ring)
Deprecated. |
void |
addRing(LinearRing2D ring)
|
MultiPolygon2D |
clip(Box2D box)
Returns a new instance of MultiPolygon2D. |
MultiPolygon2D |
clone()
|
Polygon2D |
complement()
Returns the domain which complements this domain in the plane. |
boolean |
contains(double x,
double y)
Checks if the shape contains the planar point defined by (x,y). |
boolean |
contains(Point2D point)
Checks if the shape contains the given point. |
void |
draw(Graphics2D g2)
Draws the boundary of the domain, using current Stroke and color. |
boolean |
equals(Object obj)
|
void |
fill(Graphics2D g)
Fills the interior of the domain, using the Graphics current Paint. |
CirculinearBoundarySet2D<LinearRing2D> |
getBoundary()
Returns the boundary of the set. |
Box2D |
getBoundingBox()
Returns the bounding box of the shape. |
CirculinearDomain2D |
getBuffer(double dist)
Computes the buffer of the shape, formed by the set of points located at a distance from the shape that is lower or equal to d. |
double |
getDistance(double x,
double y)
get the distance of the shape to the given point, specified by x and y, or the distance of point to the frontier of the shape in the case of a plain (i.e. |
double |
getDistance(Point2D p)
get the distance of the shape to the given point, or the distance of point to the frontier of the shape in the case of a plain shape. |
int |
getEdgeNumber()
Returns the number of edges of the polygon |
Collection<LineSegment2D> |
getEdges()
Return the edges as line segments of the polygon |
Collection<SimplePolygon2D> |
getPolygons()
Return the set of (oriented) polygons forming this MultiPolygon2D. |
Collection<LinearRing2D> |
getRings()
Returns the set of rings comprising the boundary of this polygon. |
Point2D |
getVertex(int i)
Returns the i-th vertex of the polygon. |
int |
getVertexNumber()
Returns the number of vertices of the polygon |
Collection<Point2D> |
getVertices()
Returns the vertices (singular points) of the polygon |
boolean |
isBounded()
Returns true if the shape is bounded, that is if we can draw a finite rectangle enclosing the shape. |
boolean |
isEmpty()
The MultiPolygon2D is empty either if it contains no ring, or if all rings are empty. |
MultiPolygon2D |
transform(AffineTransform2D trans)
Transforms the shape by an affine transform. |
CirculinearDomain2D |
transform(CircleInversion2D inv)
Transforms the shape by a circle inversion. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MultiPolygon2D()
public MultiPolygon2D(LinearRing2D ring)
public MultiPolygon2D(LinearRing2D[] rings)
public MultiPolygon2D(SimplePolygon2D polygon)
public MultiPolygon2D(Collection<LinearRing2D> lines)
| Method Detail |
|---|
public void addPolygon(SimplePolygon2D polygon)
public Collection<SimplePolygon2D> getPolygons()
@Deprecated public void addPolyline(LinearRing2D ring)
public void addRing(LinearRing2D ring)
public Collection<LinearRing2D> getRings()
Polygon2D
getRings in interface Polygon2Dpublic CirculinearDomain2D transform(CircleInversion2D inv)
CirculinearShape2D
transform in interface CirculinearDomain2Dtransform in interface CirculinearShape2Dinv - the circle inversion
public CirculinearDomain2D getBuffer(double dist)
CirculinearShape2D
getBuffer in interface CirculinearShape2Ddist - the maximal distance between a point of the buffer and the
shape
public CirculinearBoundarySet2D<LinearRing2D> getBoundary()
Domain2DThe returned curve is oriented, with an interior and an exterior.
getBoundary in interface CirculinearDomain2DgetBoundary in interface Domain2DgetBoundary in interface Polygon2Dpublic Polygon2D complement()
Domain2D
complement in interface Domain2Dcomplement in interface Polygon2Dpublic Collection<LineSegment2D> getEdges()
Polygon2D
getEdges in interface Polygon2Dpublic int getEdgeNumber()
Polygon2D
getEdgeNumber in interface Polygon2Dpublic Collection<Point2D> getVertices()
Polygon2D
getVertices in interface Polygon2Dpublic Point2D getVertex(int i)
getVertex in interface Polygon2Di - index of the vertex, between 0 and the number of verticespublic int getVertexNumber()
Polygon2D
getVertexNumber in interface Polygon2Dpublic Box2D getBoundingBox()
Shape2D
getBoundingBox in interface Shape2Dpublic MultiPolygon2D clip(Box2D box)
clip in interface Domain2Dclip in interface Shape2Dbox - the clipping box
public double getDistance(Point2D p)
Shape2D
getDistance in interface Shape2D
public double getDistance(double x,
double y)
Shape2D
getDistance in interface Shape2Dpublic boolean isBounded()
Shape2D
isBounded in interface Shape2Dpublic boolean isEmpty()
isEmpty in interface Shape2Dpublic MultiPolygon2D transform(AffineTransform2D trans)
Shape2D
transform in interface Domain2Dtransform in interface Polygon2Dtransform in interface Shape2Dtrans - an affine transform
public boolean contains(Point2D point)
Shape2D
contains in interface Shape2D
public boolean contains(double x,
double y)
Shape2D
contains in interface Shape2Dpublic void draw(Graphics2D g2)
Domain2D
draw in interface Domain2Ddraw in interface Shape2Dg2 - the Graphics to draw onpublic void fill(Graphics2D g)
Domain2D
fill in interface Domain2Dg - the Graphics to fill onpublic boolean equals(Object obj)
equals in class Objectpublic MultiPolygon2D clone()
clone in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||