public static class IlvPolygon2D.Float extends IlvPolygon2D
Float
class defines a polygon with
float
coordinates.IlvPolygon2D.Double, IlvPolygon2D.Float
Constructor and Description |
---|
Float(float[] xpoints,
float[] ypoints,
int npoints)
Creates a new
IlvPolygon2D.Float instance, connecting given
points. |
Float(Point2D[] points)
Creates a new
IlvPolygon2D.Float 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 Float(Point2D[] points)
IlvPolygon2D.Float
instance, connecting given
points.points
- A non-empty array of points.public Float(float[] xpoints, float[] ypoints, int npoints)
IlvPolygon2D.Float
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 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 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.