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

Field Summary
 
Fields inherited from interface math.geom2d.Shape2D
ACCURACY
 
Method Summary
 PointShape2D clip(Box2D box)
          When a PointShape2D is clipped, the result is still a PointShape2D.
 java.util.Collection<Point2D> points()
          Returns the points in the shape as a collection.
 int size()
          Returns the number of points in the set.
 PointShape2D transform(AffineTransform2D trans)
          Transforms the point shape by an affine transform.
 
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
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

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