pub enum GlobalOrder {
RowMajor,
ColMajor,
SwizzleRow(u32),
SwizzleCol(u32),
}Expand description
Describes the global traversal order as flattened cube position increases.
RowMajor: standard row-first traversalColMajor: standard column-first traversalSwizzleCol(w): zigzag pattern down columns, withw-wide stepsSwizzleRow(w): zigzag pattern across rows, withw-wide steps
Special cases:
SwizzleCol(1)is equivalent toColMajorSwizzleRow(1)is equivalent toRowMajor
Swizzle modes may fail if their w does not divide the problem well.
Variants§
Implementations§
Source§impl GlobalOrder
impl GlobalOrder
Sourcepub fn canonicalize(self) -> Self
pub fn canonicalize(self) -> Self
Since they are equivalent but the latter form will skip some calculations,
SwizzleColMajor(1)becomesColMajorSwizzleRowMajor(1)becomesRowMajor
Trait Implementations§
Source§impl Clone for GlobalOrder
impl Clone for GlobalOrder
Source§fn clone(&self) -> GlobalOrder
fn clone(&self) -> GlobalOrder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GlobalOrder
impl Debug for GlobalOrder
Source§impl Default for GlobalOrder
impl Default for GlobalOrder
Source§fn default() -> GlobalOrder
fn default() -> GlobalOrder
Returns the “default value” for a type. Read more
Source§impl Hash for GlobalOrder
impl Hash for GlobalOrder
Source§impl PartialEq for GlobalOrder
impl PartialEq for GlobalOrder
Source§fn eq(&self, other: &GlobalOrder) -> bool
fn eq(&self, other: &GlobalOrder) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for GlobalOrder
impl Eq for GlobalOrder
impl StructuralPartialEq for GlobalOrder
Auto Trait Implementations§
impl Freeze for GlobalOrder
impl RefUnwindSafe for GlobalOrder
impl Send for GlobalOrder
impl Sync for GlobalOrder
impl Unpin for GlobalOrder
impl UnsafeUnpin for GlobalOrder
impl UnwindSafe for GlobalOrder
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
Source§impl<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CompilationArg for T
impl<T> CompilationArg for T
Source§fn dynamic_cast<Arg>(&self) -> Argwhere
Arg: CompilationArg,
fn dynamic_cast<Arg>(&self) -> Argwhere
Arg: CompilationArg,
Compilation args should be the same even with different element types. However, it isn’t
possible to enforce it with the type system. So, we make the compilation args serializable
and dynamically cast them. Read more
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.