Struct tile_net::TileNet
[−]
[src]
pub struct TileNet<T> { /* fields omitted */ }
TileNet
is the main class in this library
It represents a 2D space with dimensions rows x columns. Each index represents a point in space. Row 'n' and column 'm' denote the tile from x from n inclusive to n+1 exclusive, and y from m inclusive to m+1 exclusive.
use tile_net::TileNet; #[derive(Clone, Debug, Default)] struct Example(i32); let my_net = TileNet::<Example>::new(10, 10); println!("{:?}", my_net);
Methods
impl TileNet<usize>
[src]
impl<T> TileNet<T> where T: Clone
[src]
fn prepare(&mut self) -> TileNetProxy<T>
fn get_raw(&self) -> &[T]
fn set_box(&mut self, value: &T, start: (usize, usize), stop: (usize, usize))
fn set_row(&mut self, value: &T, row: usize)
fn set_col(&mut self, value: &T, col: usize)
fn set(&mut self, value: &T, p: (usize, usize))
impl<T> TileNet<T> where T: Clone + Default
[src]
impl<T> TileNet<T> where T: Default
[src]
impl<T> TileNet<T>
[src]
fn row_count(&self) -> usize
fn col_count(&self) -> usize
fn get(&self, p: (usize, usize)) -> Option<&T>
fn get_size(&self) -> (usize, usize)
fn view_all(&self) -> TileView<T>
fn view_center_f32(&self,
position: (f32, f32),
span: (usize, usize))
-> TileView<T>
position: (f32, f32),
span: (usize, usize))
-> TileView<T>
fn view_center(&self,
position: (usize, usize),
span: (usize, usize))
-> TileView<T>
position: (usize, usize),
span: (usize, usize))
-> TileView<T>
fn view_box(&self, rectangle: (usize, usize, usize, usize)) -> TileView<T>
fn get_mut(&mut self, p: (usize, usize)) -> Option<&mut T>
fn collide_set<I>(&self, list: I) -> TileSet<T, I> where I: Iterator<Item=(i32, i32)>
Trait Implementations
impl<T: Clone> Clone for TileNet<T>
[src]
fn clone(&self) -> TileNet<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more