public class SpatialHashGrid
Class SpatialHashGrid. Provides spatialhashgrid functionality for the Hytale server.
java.lang.Object > SpatialHashGrid
Field Summary
cell
final
Vector3i
cell
Field cell.
entry
final
Entry
entry
Field entry.
bucket
final
List>
bucket
Field bucket.
toRemove
final
Set
toRemove
Field toRemove.
oldCell
final
Vector3i
oldCell
Field oldCell.
newCell
final
Vector3i
newCell
Field newCell.
oldBucket
final
List>
oldBucket
Field oldBucket.
radiusSq
final
double
radiusSq
Field radiusSq.
closestVisitor
final
CellVisitor
closestVisitor
Field closestVisitor.
dist
final
double
dist
Field dist.
withinVisitor
final
CellVisitor
withinVisitor
Field withinVisitor.
minX
final
int
minX
Field minX.
minY
final
int
minY
Field minY.
minZ
final
int
minZ
Field minZ.
maxX
final
int
maxX
Field maxX.
maxY
final
int
maxY
Field maxY.
maxZ
final
int
maxZ
Field maxZ.
lookup
final
Vector3i
lookup
Field lookup.
keepGoing
final
boolean
keepGoing
Field keepGoing.
Method Detail
SpatialHashGrid
public
public
SpatialHashGrid
(final double cellSize)
Method SpatialHashGrid.
- Parameters:
final doublecellSize
Vector3i
public
new
Vector3i
(MathUtil.floor(p.x / this.cellSize)
Method Vector3i.
- Parameters:
MathUtil.floor(p.x /this.cellSize
getAll
public
T>
getAll
()
Method getAll.
size
public
int
size
()
Method size.
isEmpty
public
boolean
isEmpty
()
Method isEmpty.
ObjectArrayList
public
new
ObjectArrayList
()
Method ObjectArrayList.
remove
public
boolean
remove
(final T value)
Method remove.
- Parameters:
final Tvalue
removeIf
public
void
removeIf
(final Predicate predicate)
Method removeIf.
- Parameters:
final Predicatepredicate
visit
public
boolean
visit
(final List> bucket)
Method visit.
- Parameters:
final Listbucket>