public class ZoneGrid
extends java.lang.Object
Constructor and Description |
---|
ZoneGrid(int zoneSize) |
ZoneGrid(int xZoneSize,
int yZoneSize,
int zZoneSize) |
ZoneGrid(com.simsilica.mathd.Vec3i sizes) |
Modifier and Type | Method and Description |
---|---|
ZoneKey |
fromLongId(long id) |
com.simsilica.mathd.Vec3i |
getZoneSize() |
static void |
main(java.lang.String... args) |
long |
toLongId(ZoneKey key)
Converts the x, y, z to a single long by masking
each value and bit shifting.
|
java.lang.String |
toString() |
ZoneKey |
worldToKey(double x,
double y,
double z) |
ZoneKey |
worldToKey(com.simsilica.mathd.Vec3d pos) |
com.simsilica.mathd.Vec3i |
worldToZone(double x,
double y,
double z) |
com.simsilica.mathd.Vec3i |
worldToZone(com.simsilica.mathd.Vec3d world) |
com.simsilica.mathd.Vec3i |
zoneToWorld(int x,
int y,
int z) |
com.simsilica.mathd.Vec3i |
zoneToWorld(ZoneKey key) |
public ZoneGrid(int zoneSize)
public ZoneGrid(int xZoneSize, int yZoneSize, int zZoneSize)
public ZoneGrid(com.simsilica.mathd.Vec3i sizes)
public com.simsilica.mathd.Vec3i getZoneSize()
public com.simsilica.mathd.Vec3i worldToZone(double x, double y, double z)
public com.simsilica.mathd.Vec3i worldToZone(com.simsilica.mathd.Vec3d world)
public com.simsilica.mathd.Vec3i zoneToWorld(int x, int y, int z)
public ZoneKey worldToKey(com.simsilica.mathd.Vec3d pos)
public ZoneKey worldToKey(double x, double y, double z)
public com.simsilica.mathd.Vec3i zoneToWorld(ZoneKey key)
public long toLongId(ZoneKey key)
public ZoneKey fromLongId(long id)
public static void main(java.lang.String... args)
public java.lang.String toString()
toString
in class java.lang.Object