public class GridIndex extends Object
Constructor and Description |
---|
GridIndex(DelaunayTriangulation delaunay,
int xCellCount,
int yCellCount)
Constructs a grid index holding the triangles of a delaunay
triangulation.
|
GridIndex(DelaunayTriangulation delaunay,
int xCellCount,
int yCellCount,
BoundingBox region)
Constructs a grid index holding the triangles of a delaunay
triangulation.
|
Modifier and Type | Method and Description |
---|---|
Triangle |
findCellTriangleOf(Point point)
Finds a triangle near the given point
|
void |
updateIndex(Iterator<Triangle> updatedTriangles)
Updates the grid index to reflect changes to the triangulation.
|
public GridIndex(DelaunayTriangulation delaunay, int xCellCount, int yCellCount)
delaunay
- delaunay triangulation to indexxCellCount
- number of grid cells in a rowyCellCount
- number of grid cells in a columnpublic GridIndex(DelaunayTriangulation delaunay, int xCellCount, int yCellCount, BoundingBox region)
delaunay
- delaunay triangulation to indexxCellCount
- number of grid cells in a rowyCellCount
- number of grid cells in a columnregion
- geographic region to indexpublic Triangle findCellTriangleOf(Point point)
point
- a query pointpublic void updateIndex(Iterator<Triangle> updatedTriangles)
updatedTriangles
- changed triangles of the triangulation. This may be added
triangles, removed triangles or both. All that matter is that
they cover the changed area.Copyright © 2016. All rights reserved.