Struct valence_math::bool::BVec3
source · #[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]) -> BVec3
pub const fn from_array(a: [bool; 3]) -> BVec3
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: BVec3)
fn bitand_assign(&mut self, rhs: BVec3)
Performs the
&=
operation. Read moresource§impl BitOrAssign for BVec3
impl BitOrAssign for BVec3
source§fn bitor_assign(&mut self, rhs: BVec3)
fn bitor_assign(&mut self, rhs: BVec3)
Performs the
|=
operation. Read moresource§impl BitXorAssign for BVec3
impl BitXorAssign for BVec3
source§fn bitxor_assign(&mut self, rhs: BVec3)
fn bitxor_assign(&mut self, rhs: BVec3)
Performs the
^=
operation. Read moreimpl 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)