pub struct RipMaps<Samples> {
pub map_data: LevelMaps<Samples>,
pub level_count: Vec2<usize>,
}
Expand description
In addition to the full resolution image,
this layer also contains smaller versions,
and each smaller version has further versions with varying aspect ratios.
Samples
can currently only be FlatSamples
.
Fields§
§map_data: LevelMaps<Samples>
A flattened list containing the individual levels
level_count: Vec2<usize>
The number of levels that were generated along the x-axis and y-axis.
Implementations§
source§impl<Samples> RipMaps<Samples>
impl<Samples> RipMaps<Samples>
sourcepub fn get_level_index(&self, level: Vec2<usize>) -> usize
pub fn get_level_index(&self, level: Vec2<usize>) -> usize
Flatten the 2D level index to a one dimensional index.
sourcepub fn get_by_level(&self, level: Vec2<usize>) -> Option<&Samples>
pub fn get_by_level(&self, level: Vec2<usize>) -> Option<&Samples>
Return a level by level index. Level 0
has the largest resolution.
sourcepub fn get_by_level_mut(&mut self, level: Vec2<usize>) -> Option<&mut Samples>
pub fn get_by_level_mut(&mut self, level: Vec2<usize>) -> Option<&mut Samples>
Return a mutable level reference by level index. Level 0
has the largest resolution.
Trait Implementations§
source§impl<Samples: PartialEq> PartialEq for RipMaps<Samples>
impl<Samples: PartialEq> PartialEq for RipMaps<Samples>
impl<Samples: Eq> Eq for RipMaps<Samples>
impl<Samples> StructuralPartialEq for RipMaps<Samples>
Auto Trait Implementations§
impl<Samples> Freeze for RipMaps<Samples>
impl<Samples> RefUnwindSafe for RipMaps<Samples>where
Samples: RefUnwindSafe,
impl<Samples> Send for RipMaps<Samples>where
Samples: Send,
impl<Samples> Sync for RipMaps<Samples>where
Samples: Sync,
impl<Samples> Unpin for RipMaps<Samples>where
Samples: Unpin,
impl<Samples> UnwindSafe for RipMaps<Samples>where
Samples: UnwindSafe,
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