#[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 moreimpl 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 UnsafeUnpin 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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().