|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object IntersectionGrid<T>
public class IntersectionGrid<T extends IntersectionTestObject>
a data structure that can be used to speed up intersection tests. An IntersectionTestObject is added to all grid cells that are at least partially covered by the object's axis-aligned bounding box. When testing for intersections or inclusions, only elements in the same cell need to be compared.
Constructor Summary | |
---|---|
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)
|
Method Summary | |
---|---|
Collection<Collection<T>> |
cellsFor(IntersectionTestObject object)
returns all non-empty cells that would contain the object. |
Collection<T>[][] |
getCellArray()
|
Iterable<Collection<T>> |
getCells()
returns the content object collections for all non-empty cells |
void |
insert(T object)
|
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntersectionGrid(AxisAlignedBoundingBoxXZ gridBounds, int cellCountX, int cellCountZ)
public IntersectionGrid(AxisAlignedBoundingBoxXZ gridBounds, double approxCellSizeX, double approxCellSizeZ)
Method Detail |
---|
public Collection<T>[][] getCellArray()
public Iterable<Collection<T>> getCells()
public Collection<Collection<T>> cellsFor(IntersectionTestObject object)
public void insert(T object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |