Module minutiae::container [] [src]

Declares container types that are used to provide abstracted access to data strucures within a universe.

Structs

EntityContainer

Data structure holding all of the universe's entities. The entities and their state are held in a vector of EntitySlots, each of which either holds an entity or the index of the next empty slot. Using this method, it's possible to add/remove entities from anywhere in the container without causing any allocations.

EntityPositions

For each coordinate on the grid, keeps track of the entities that inhabit it by holding a list of indexes to slots in the EntityContainer.

Enums

EntitySlot

Either holds an entity or a 'pointer' (in the form of an array index) of the next empty slot in the data structure. This functions somewhat similarly to a linked list.