Struct specs::PackedData [] [src]

pub struct PackedData<T> {
    pub components: Vec<T>,
    pub offsets: Vec<Index>,
}

Structure of packed components with offsets of which entities they belong to. Offsets define which entities the components correspond to, based on a list of entities the packed data is sent in with.

If the list of entities is all entities in the world, then the offsets in the packed data are the indices of the entities.

Fields

List of components.

Offsets used to get entities which correspond to the components.

Methods

impl<T> PackedData<T>
[src]

[src]

Modifies the data to match an entity list's length for merging.

[src]

Truncates the length of components and offsets.

Trait Implementations

impl<T: Debug> Debug for PackedData<T>
[src]

[src]

Formats the value using the given formatter.