[−][src]Trait grid_2d::coord_system::CoordSystem
A mapping from coordinate to position in the Vec backing the grid. Generally implementations will own the size of the grid.
Associated Types
type CoordIter: Iterator<Item = Coord>
An iterator which yields coords in thet same order as elements are stored in the grid.
Required methods
fn size(&self) -> Size
The size of the grid
fn index_of_coord_unchecked(&self, coord: Coord) -> usize
Given a coord, returns the index of the backing Vec which
corresponds to that coordinate. May assume that
coord.is_valid(self.size())
.
fn coord_iter(&self) -> Self::CoordIter
Returns an iterator over coords