math.geom2d.point
Interface PointSet2D
-
- All Superinterfaces:
- CirculinearShape2D, GeometricObject2D, java.lang.Iterable<Point2D>, PointShape2D, Shape2D, ShapeSet2D<Point2D>
- All Known Implementing Classes:
- PointArray2D
public interface PointSet2D extends PointShape2D, ShapeSet2D<Point2D>
A set of points. All points within the set are instances of Point2D. The most direct implementation of PointSet2D is PointArray2D.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description booleanadd(Point2D point)Adds a new point to the point set.voidaddAll(java.util.Collection<? extends Point2D> points)Add a series of pointsPointSet2Dclip(Box2D box)Returns a new point set containing only points located within the box.java.util.Collection<Point2D>points()Returns the collection of points contained in this set.intsize()Returns the number of points in the set.PointSet2Dtransform(AffineTransform2D trans)Transforms the point set by returning a new point set containing each transformed point.-
Methods inherited from interface math.geom2d.circulinear.CirculinearShape2D
buffer, transform
-
Methods inherited from interface math.geom2d.Shape2D
boundingBox, contains, contains, distance, distance, draw, isBounded, isEmpty
-
Methods inherited from interface math.geom2d.GeometricObject2D
almostEquals
-
-
-
-
Method Detail
-
add
boolean add(Point2D point)
Adds a new point to the point set. If point is not an instance of Point2D, a Point2D with same location is added instead of point.- Specified by:
addin interfaceShapeSet2D<Point2D>- Parameters:
point- the initial point in the set
-
addAll
void addAll(java.util.Collection<? extends Point2D> points)
Add a series of points- Parameters:
points- an array of points
-
points
java.util.Collection<Point2D> points()
Returns the collection of points contained in this set.- Specified by:
pointsin interfacePointShape2D- Returns:
- the collection of points
-
size
int size()
Returns the number of points in the set.- Specified by:
sizein interfacePointShape2D- Specified by:
sizein interfaceShapeSet2D<Point2D>- Returns:
- the number of points
-
transform
PointSet2D transform(AffineTransform2D trans)
Transforms the point set by returning a new point set containing each transformed point.- Specified by:
transformin interfacePointShape2D- Specified by:
transformin interfaceShape2D- Parameters:
trans- an affine transform- Returns:
- the transformed shape
-
clip
PointSet2D clip(Box2D box)
Returns a new point set containing only points located within the box.- Specified by:
clipin interfacePointShape2D- Specified by:
clipin interfaceShape2D- Parameters:
box- the clipping box- Returns:
- the clipped shape
-
-
DMelt 3.0 © DataMelt by jWork.ORG