Module region

Source

Structs§

Region
Region consisting of a bitset of entities within it
RegionMap
A region system that tracks where entities are.

Enums§

Event

Constants§

NEIGHBOR_OFFSETS 🔒
Offsets to iterate though neighbors Counter-clockwise order
REGION_LOG2 🔒
Bitshift between region and world pos, i.e. log2(REGION_SIZE)
REGION_SIZE
Region Size in blocks
TETHER_LENGTH
How far can an entity roam outside its region before it is switched over to the neighboring one In units of blocks (i.e. world pos) Used to prevent rapid switching of entities between regions

Functions§

region_in_vd
Note vd is in blocks in this case
regions_in_vd