pub struct TileGroup {
pub tile_start: u32,
pub tile_end: u32,
pub tiles: Vec<TileData>,
pub num_tiles: u32,
}Expand description
Tile group header and data.
Fields§
§tile_start: u32Starting tile index (inclusive).
tile_end: u32Ending tile index (inclusive).
tiles: Vec<TileData>Tile data entries.
num_tiles: u32Number of tiles signaled.
Implementations§
Source§impl TileGroup
impl TileGroup
Sourcepub fn tile_count(&self) -> u32
pub fn tile_count(&self) -> u32
Get number of tiles in this group.
Sourcepub fn get_tile(&self, idx: usize) -> Option<&TileData>
pub fn get_tile(&self, idx: usize) -> Option<&TileData>
Get a tile by its index within the group.
Sourcepub const fn contains_tile(&self, tile_idx: u32) -> bool
pub const fn contains_tile(&self, tile_idx: u32) -> bool
Check if this group contains a specific tile index.
Sourcepub const fn is_single_tile(&self) -> bool
pub const fn is_single_tile(&self) -> bool
Check if this is a single-tile group.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TileGroup
impl RefUnwindSafe for TileGroup
impl Send for TileGroup
impl Sync for TileGroup
impl Unpin for TileGroup
impl UnsafeUnpin for TileGroup
impl UnwindSafe for TileGroup
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more