src.math.geom2d.point.PointShape2D Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javaGeom Show documentation
Show all versions of javaGeom Show documentation
JavaGeom - The aim of JavaGeom is to provide methods to easily perform geometric computations, such as intersections of lines, clipping of polygons, transformation shapes, perimeter and area computations...
This is a binary & source redistribution of the original, unmodified JavaGeom library originating from:
"http://sourceforge.net/projects/geom-java/files/javaGeom/javaGeom%200.11.1/".
The purpose of this redistribution is to make the library available to other Maven projects.
The newest version!
/**
* File: PointShape2D.java
* Project: javaGeom
*
* Distributed under the LGPL License.
*
* Created: 6 f?vr. 09
*/
package math.geom2d.point;
import java.util.Collection;
import math.geom2d.AffineTransform2D;
import math.geom2d.Box2D;
import math.geom2d.Point2D;
import math.geom2d.circulinear.CirculinearShape2D;
/**
* 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
*
*/
public interface PointShape2D extends CirculinearShape2D, Iterable {
/**
* Returns the points in the shape as a collection.
*
* @return the collection of points
*/
public Collection points();
/**
* Returns the number of points in the set.
*
* @return the number of points
*/
public int size();
/**
* Transforms the point shape by an affine transform.
* The result is an instance of PointShape2D.
*/
public abstract PointShape2D transform(AffineTransform2D trans);
/**
* When a PointShape2D is clipped, the result is still a PointShape2D.
*/
public abstract PointShape2D clip(Box2D box);
}