org.osm2world.core.math.datastructures
public class IntersectionGrid<T extends IntersectionTestObject> extends Object
Constructor and Description |
---|
IntersectionGrid(AxisAlignedBoundingBoxXZ gridBounds,
double approxCellSizeX,
double approxCellSizeZ)
alternative constructor that uses a target cell size to calculate
the number of cells
|
IntersectionGrid(AxisAlignedBoundingBoxXZ gridBounds,
int cellCountX,
int cellCountZ) |
Modifier and Type | Method and Description |
---|---|
Collection<Collection<T>> |
cellsFor(IntersectionTestObject object)
returns all non-empty cells that would contain the object.
|
int |
cellXForCoord(double x,
double z)
returns the x index of the cell that contains the coordinate
|
int |
cellZForCoord(double x,
double z)
returns the z index of the cell that contains the coordinate
|
Collection<T>[][] |
getCellArray() |
Iterable<Collection<T>> |
getCells()
returns the content object collections for all non-empty cells
|
void |
insert(T object) |
void |
remove(T object) |
public IntersectionGrid(AxisAlignedBoundingBoxXZ gridBounds, int cellCountX, int cellCountZ)
public IntersectionGrid(AxisAlignedBoundingBoxXZ gridBounds, double approxCellSizeX, double approxCellSizeZ)
public Collection<T>[][] getCellArray()
public Iterable<Collection<T>> getCells()
public Collection<Collection<T>> cellsFor(IntersectionTestObject object)
public void insert(T object)
public void remove(T object)
public final int cellXForCoord(double x, double z)
public final int cellZForCoord(double x, double z)