Struct RipMaps
pub struct RipMaps<Samples> { pub map_data: LevelMaps<Samples>, pub level_count: Vec2<usize> }
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
impl<Samples> RipMaps<Samples>
fn get_level_index(&self, level: Vec2<usize>) -> usizeFlatten the 2D level index to a one dimensional index.
fn get_by_level(&self, level: Vec2<usize>) -> Option<&Samples>Return a level by level index. Level
0has the largest resolution.fn get_by_level_mut(&mut self, level: Vec2<usize>) -> Option<&mut Samples>Return a mutable level reference by level index. Level
0has the largest resolution.
Trait Implementations
impl<Samples: Clone> Clone for RipMaps<Samples>
fn clone(&self) -> Self
impl<Samples: Debug> Debug for RipMaps<Samples>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<Samples: Eq> Eq for RipMaps<Samples>
impl<Samples: PartialEq> PartialEq for RipMaps<Samples>
fn eq(&self, other: &Self) -> bool
impl<Samples: PartialEq> StructuralPartialEq for RipMaps<Samples>
Auto Trait Implementations
impl<Samples> Freeze for RipMaps<Samples>
where
Vec<Samples>: Freeze,
impl<Samples> RefUnwindSafe for RipMaps<Samples>
where
Vec<Samples>: RefUnwindSafe,
impl<Samples> Send for RipMaps<Samples>
where
Vec<Samples>: Send,
impl<Samples> Sync for RipMaps<Samples>
where
Vec<Samples>: Sync,
impl<Samples> Unpin for RipMaps<Samples>
where
Vec<Samples>: Unpin,
impl<Samples> UnsafeUnpin for RipMaps<Samples>
where
Vec<Samples>: UnsafeUnpin,
impl<Samples> UnwindSafe for RipMaps<Samples>
where
Vec<Samples>: UnwindSafe,
Blanket Implementations
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for RipMaps<Samples>
where
ST: ?Sized,
DT: ?Sized,
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for RipMaps<Samples>
where
ST: ?Sized,
DT: ?Sized,
impl<T> Any for RipMaps<Samples>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for RipMaps<Samples>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for RipMaps<Samples>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for RipMaps<Samples>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for RipMaps<Samples>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Pointable for RipMaps<Samples>
const ALIGN: usize = _;type Init = T;unsafe fn init(init: <T as Pointable>::Init) -> usizeunsafe fn deref<'a>(ptr: usize) -> &'a Tunsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Tunsafe fn drop(ptr: usize)
impl<T> Read<Exclusive, BecauseExclusive> for RipMaps<Samples>
where
T: ?Sized,
impl<T> ToOwned for RipMaps<Samples>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for RipMaps<Samples>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for RipMaps<Samples>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for RipMaps<Samples>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>