pub struct TileMap {
pub include_ids: HashSet<usize>,
pub exclude_ids: HashSet<usize>,
/* private fields */
}
Fields§
§include_ids: HashSet<usize>
§exclude_ids: HashSet<usize>
Implementations§
Source§impl TileMap
impl TileMap
pub fn new(size: Vec2<usize>, fill_id: usize) -> Self
pub fn with_buffer(size: Vec2<usize>, buffer: Vec<usize>) -> Option<Self>
pub fn size(&self) -> Vec2<usize>
pub fn buffer(&self) -> &[usize]
pub fn buffer_mut(&mut self) -> &mut [usize]
pub fn index(&self, location: impl Into<Vec2<usize>>) -> usize
pub fn location(&self, index: usize) -> Vec2<usize>
pub fn get(&self, location: impl Into<Vec2<usize>>) -> Option<usize>
pub fn set(&mut self, location: impl Into<Vec2<usize>>, id: usize)
pub fn fill( &mut self, from: impl Into<Vec2<usize>>, to: impl Into<Vec2<usize>>, id: usize, )
pub fn is_id_valid(&self, id: usize) -> bool
pub fn emit(&self) -> impl Iterator<Item = TileInstance> + '_
pub fn emit_region( &self, region: impl Into<Rect<usize, usize>>, repeating: bool, ) -> impl Iterator<Item = TileInstance> + '_
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TileMap
impl RefUnwindSafe for TileMap
impl Send for TileMap
impl Sync for TileMap
impl Unpin for TileMap
impl UnwindSafe for TileMap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more