#[repr(C, align(1))]pub struct BVec3 {
pub x: bool,
pub y: bool,
pub z: bool,
}
Expand description
A 3-dimensional bool
vector mask.
Fields§
§x: bool
§y: bool
§z: bool
Implementations§
Source§impl BVec3
impl BVec3
Sourcepub const fn from_array(a: [bool; 3]) -> Self
pub const fn from_array(a: [bool; 3]) -> Self
Creates a new vector mask from a bool array.
Sourcepub fn bitmask(self) -> u32
pub fn bitmask(self) -> u32
Returns a bitmask with the lowest 3 bits set from the elements of self
.
A true element results in a 1
bit and a false element in a 0
bit. Element x
goes
into the first lowest bit, element y
into the second, etc.
Trait Implementations§
Source§impl BitAndAssign for BVec3
impl BitAndAssign for BVec3
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&=
operation. Read moreSource§impl BitOrAssign for BVec3
impl BitOrAssign for BVec3
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|=
operation. Read moreSource§impl BitXorAssign for BVec3
impl BitXorAssign for BVec3
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^=
operation. Read moreSource§impl<'de> Deserialize<'de> for BVec3
impl<'de> Deserialize<'de> for BVec3
Deserialize expects a sequence of 3 values.
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
impl Copy for BVec3
impl Eq for BVec3
impl StructuralPartialEq for BVec3
Auto Trait Implementations§
impl Freeze for BVec3
impl RefUnwindSafe for BVec3
impl Send for BVec3
impl Sync for BVec3
impl Unpin for BVec3
impl UnwindSafe for BVec3
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