#[repr(C, align(1))]pub struct BVec4 {
pub x: bool,
pub y: bool,
pub z: bool,
pub w: bool,
}Expand description
A 4-dimensional bool vector mask.
Fields§
§x: bool§y: bool§z: bool§w: boolImplementations§
Source§impl BVec4
impl BVec4
Sourcepub const fn from_array(a: [bool; 4]) -> BVec4
pub const fn from_array(a: [bool; 4]) -> BVec4
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 4 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<&BVec4> for BVec4
impl BitAndAssign<&BVec4> for BVec4
Source§fn bitand_assign(&mut self, rhs: &BVec4)
fn bitand_assign(&mut self, rhs: &BVec4)
Performs the
&= operation. Read moreSource§impl BitAndAssign for BVec4
impl BitAndAssign for BVec4
Source§fn bitand_assign(&mut self, rhs: BVec4)
fn bitand_assign(&mut self, rhs: BVec4)
Performs the
&= operation. Read moreSource§impl BitOrAssign<&BVec4> for BVec4
impl BitOrAssign<&BVec4> for BVec4
Source§fn bitor_assign(&mut self, rhs: &BVec4)
fn bitor_assign(&mut self, rhs: &BVec4)
Performs the
|= operation. Read moreSource§impl BitOrAssign for BVec4
impl BitOrAssign for BVec4
Source§fn bitor_assign(&mut self, rhs: BVec4)
fn bitor_assign(&mut self, rhs: BVec4)
Performs the
|= operation. Read moreSource§impl BitXorAssign<&BVec4> for BVec4
impl BitXorAssign<&BVec4> for BVec4
Source§fn bitxor_assign(&mut self, rhs: &BVec4)
fn bitxor_assign(&mut self, rhs: &BVec4)
Performs the
^= operation. Read moreSource§impl BitXorAssign for BVec4
impl BitXorAssign for BVec4
Source§fn bitxor_assign(&mut self, rhs: BVec4)
fn bitxor_assign(&mut self, rhs: BVec4)
Performs the
^= operation. Read moreSource§impl<'de> Deserialize<'de> for BVec4
Deserialize expects a sequence of 4 values.
impl<'de> Deserialize<'de> for BVec4
Deserialize expects a sequence of 4 values.
Source§fn deserialize<D>(
deserializer: D,
) -> Result<BVec4, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<BVec4, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for BVec4
Serialize as a sequence of 4 values.
impl Serialize for BVec4
Serialize as a sequence of 4 values.
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for BVec4
impl Eq for BVec4
impl StructuralPartialEq for BVec4
Auto Trait Implementations§
impl Freeze for BVec4
impl RefUnwindSafe for BVec4
impl Send for BVec4
impl Sync for BVec4
impl Unpin for BVec4
impl UnwindSafe for BVec4
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, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.