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>) -> usize

Flatten 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 0 has 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 0 has 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,

impl<T> Borrow<T> for RipMaps<Samples> where T: ?Sized,

impl<T> BorrowMut<T> for RipMaps<Samples> where T: ?Sized,

impl<T> CloneToUninit for RipMaps<Samples> where T: Clone,

impl<T> From<T> for RipMaps<Samples>

impl<T> Pointable for RipMaps<Samples>

impl<T> Read<Exclusive, BecauseExclusive> for RipMaps<Samples> where T: ?Sized,

impl<T> ToOwned for RipMaps<Samples> where T: Clone,

impl<T, U> Into<U> for RipMaps<Samples> where U: From<T>,

impl<T, U> TryFrom<U> for RipMaps<Samples> where U: Into<T>,

impl<T, U> TryInto<U> for RipMaps<Samples> where U: TryFrom<T>,