pub struct Atlas { /* private fields */ }Implementations§
Source§impl Atlas
impl Atlas
pub fn grid( size: [u32; 2], cell: [u32; 2], count: Option<usize>, ) -> Result<Self, AnimError>
pub fn rects(size: [u32; 2], frames: Vec<[u32; 4]>) -> Result<Self, AnimError>
pub fn size(&self) -> [u32; 2]
pub fn frames(&self) -> &[[u32; 4]]
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn uv(&self, frame: usize) -> Option<[f32; 4]>
Trait Implementations§
impl Eq for Atlas
impl StructuralPartialEq for Atlas
Auto Trait Implementations§
impl Freeze for Atlas
impl RefUnwindSafe for Atlas
impl Send for Atlas
impl Sync for Atlas
impl Unpin for Atlas
impl UnsafeUnpin for Atlas
impl UnwindSafe for Atlas
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