pub struct RotationMask3D(/* private fields */);Expand description
Bitmask over the six Rotation3D axis permutations.
A box has 24 orientation-preserving rotations in 3D, but only the six
distinct axis permutations of (w, h, d) produce different placements
(the other 18 collapse onto these because the box is unlabelled).
Implementations§
Source§impl RotationMask3D
impl RotationMask3D
Sourcepub const UPRIGHT: Self
pub const UPRIGHT: Self
Only the two permutations that preserve the y-axis as vertical
(Xyz and Zyx).
Sourcepub fn contains(self, rotation: Rotation3D) -> bool
pub fn contains(self, rotation: Rotation3D) -> bool
Whether this mask contains the given rotation.
Sourcepub fn iter(self) -> impl Iterator<Item = Rotation3D>
pub fn iter(self) -> impl Iterator<Item = Rotation3D>
Iterator over the rotations contained in this mask, in Rotation3D
declaration order (Xyz, Xzy, Yxz, Yzx, Zxy, Zyx).
Trait Implementations§
Source§impl Clone for RotationMask3D
impl Clone for RotationMask3D
Source§fn clone(&self) -> RotationMask3D
fn clone(&self) -> RotationMask3D
Returns a duplicate of the value. Read more
1.0.0 · 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 RotationMask3D
impl Debug for RotationMask3D
Source§impl<'de> Deserialize<'de> for RotationMask3D
impl<'de> Deserialize<'de> for RotationMask3D
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for RotationMask3D
impl Hash for RotationMask3D
Source§impl PartialEq for RotationMask3D
impl PartialEq for RotationMask3D
Source§impl Serialize for RotationMask3D
impl Serialize for RotationMask3D
impl Copy for RotationMask3D
impl Eq for RotationMask3D
impl StructuralPartialEq for RotationMask3D
Auto Trait Implementations§
impl Freeze for RotationMask3D
impl RefUnwindSafe for RotationMask3D
impl Send for RotationMask3D
impl Sync for RotationMask3D
impl Unpin for RotationMask3D
impl UnsafeUnpin for RotationMask3D
impl UnwindSafe for RotationMask3D
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more