math.geom2d.grid
Interface Grid2D

All Known Implementing Classes:
SquareGrid2D, TriangleGrid2D

public interface Grid2D

Defines a grid for snapping mouse pointer. The main purpose of a grid is to find the closest vertex to a given point. It also provides methods for accessing the collection of vertices and edges visible in a Box2D.

Author:
dlegland

Method Summary
 Point2D getClosestVertex(Point2D point)
           
 java.util.Collection<LineSegment2D> getEdges(Box2D box)
           
 Point2D getOrigin()
           
 PointSet2D getVertices(Box2D box)
           
 

Method Detail

getOrigin

Point2D getOrigin()

getVertices

PointSet2D getVertices(Box2D box)

getEdges

java.util.Collection<LineSegment2D> getEdges(Box2D box)

getClosestVertex

Point2D getClosestVertex(Point2D point)