public static class IlvPolygon2D.Double extends IlvPolygon2D
Double
class defines a polygon with
double
coordinates.IlvPolygon2D.Double, IlvPolygon2D.Float
Constructor and Description |
---|
Double(double[] xpoints,
double[] ypoints,
int npoints)
Creates a new
IlvPolygon2D.Double instance, connecting given
points. |
Double(float[] xpoints,
float[] ypoints,
int npoints)
Creates a new
IlvPolygon2D.Double instance, connecting given
points. |
Double(int[] xpoints,
int[] ypoints,
int npoints)
Creates a new
IlvPolygon2D.Double instance, connecting given
points. |
Double(Point2D[] points)
Creates a new
IlvPolygon2D.Double instance, connecting given
points. |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates a copy of this polygon.
|
Rectangle2D |
getBounds2D()
Returns the smallest rectangle covering all points.
|
int |
getNumberOfPoints()
Returns the number of points in the polygon.
|
Point2D |
getPoint(int index)
Returns a specific point (0 <= index < getNumberOfPoints()).
|
Point2D[] |
getPoints()
Returns the array of points.
|
int |
hashCode() |
contains, contains, contains, contains, containsInClosure, containsInConvexHull, containsInInterior, equals, getArea, getBounds, getGravity0, getGravity1, getGravity2, getPathIterator, getPathIterator, intersects, intersects, toString
public Double(Point2D[] points)
IlvPolygon2D.Double
instance, connecting given
points.points
- A non-empty array of points.public Double(double[] xpoints, double[] ypoints, int npoints)
IlvPolygon2D.Double
instance, connecting given
points.xpoints
- An array containing the x values of the points. Its
length must be at least npoints.ypoints
- An array containing the y values of the points. Its
length must be at least npoints.npoints
- The number of points.public Double(float[] xpoints, float[] ypoints, int npoints)
IlvPolygon2D.Double
instance, connecting given
points. The points are given with less precision.xpoints
- An array containing the x values of the points. Its
length must be at least npoints.ypoints
- An array containing the y values of the points. Its
length must be at least npoints.npoints
- The number of points.public Double(int[] xpoints, int[] ypoints, int npoints)
IlvPolygon2D.Double
instance, connecting given
points. The points are given as integers.xpoints
- An array containing the x values of the points. Its
length must be at least npoints.ypoints
- An array containing the y values of the points. Its
length must be at least npoints.npoints
- The number of points.public int getNumberOfPoints()
getNumberOfPoints
in class IlvPolygon2D
public Point2D getPoint(int index)
getPoint
in class IlvPolygon2D
public Point2D[] getPoints()
getPoints
in class IlvPolygon2D
public Rectangle2D getBounds2D()
getBounds2D
in interface Shape
getBounds2D
in class IlvPolygon2D
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.