math.geom2d.point
Interface PointShape2D
- All Superinterfaces:
- CirculinearShape2D, GeometricObject2D, java.lang.Iterable<Point2D>, Shape2D
- All Known Subinterfaces:
- PointSet2D
- All Known Implementing Classes:
- Point2D, PointArray2D
public interface PointShape2D
- extends CirculinearShape2D, java.lang.Iterable<Point2D>
Interface for shapes composed of a finite set of points. Single points
should also implements this interface. Implementations of this interface
can contains duplicate points.
- Author:
- dlegland
Methods inherited from interface java.lang.Iterable |
iterator |
points
java.util.Collection<Point2D> points()
- Returns the points in the shape as a collection.
- Returns:
- the collection of points
size
int size()
- Returns the number of points in the set.
- Returns:
- the number of points
transform
PointShape2D transform(AffineTransform2D trans)
- Transforms the point shape by an affine transform.
The result is an instance of PointShape2D.
- Specified by:
transform
in interface Shape2D
- Parameters:
trans
- an affine transform
- Returns:
- the transformed shape
clip
PointShape2D clip(Box2D box)
- When a PointShape2D is clipped, the result is still a PointShape2D.
- Specified by:
clip
in interface Shape2D
- Parameters:
box
- the clipping box
- Returns:
- the clipped shape