[−][src]Struct a2d::SpriteMapDimensions
Describes the dimensions of how the underlying sprite sheet is divided for this sprite map
Implementations
impl SpriteMapDimensions
[src]
pub fn nrows(&self) -> u32
[src]
Returns the number of rows in this map
pub fn ncols(&self) -> u32
[src]
Returns the number of columns in this map
pub fn cell_index(&self, row_col: [u32; 2]) -> u32
[src]
Returns the cell index of the cell at the given row and column
pub fn cell_coord(&self, cell_index: u32) -> [u32; 2]
[src]
Sets the sprite at instance index i to use the sprite cell indicated by the given cell_index
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SpriteMapDimensions
impl Send for SpriteMapDimensions
impl Sync for SpriteMapDimensions
impl Unpin for SpriteMapDimensions
impl UnwindSafe for SpriteMapDimensions
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,