[][src]Struct a2d::SpriteMapDimensions

pub struct SpriteMapDimensions { /* fields omitted */ }

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

impl From<[u32; 2]> for SpriteMapDimensions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.