[−][src]Struct bevy_math::Vec4Mask
A 4-dimensional vector mask.
This type is typically created by comparison methods on Vec4
. It is
essentially a vector of four boolean values.
Implementations
impl Vec4Mask
[src]
pub fn new(x: bool, y: bool, z: bool, w: bool) -> Vec4Mask
[src]
Creates a new Vec4Mask
.
pub fn bitmask(self) -> u32
[src]
Returns a bitmask with the lowest four bits set from the elements of
the Vec4Mask
.
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.
pub fn any(self) -> bool
[src]
Returns true if any of the elements are true, false otherwise.
In other words: x || y || z || w
.
pub fn all(self) -> bool
[src]
Returns true if all the elements are true, false otherwise.
In other words: x && y && z && w
.
pub fn select(self, if_true: Vec4, if_false: Vec4) -> Vec4
[src]
Creates a new Vec4
from the elements in if_true
and if_false
,
selecting which to use for each element based on the Vec4Mask
.
A true element in the mask uses the corresponding element from
if_true
, and false uses the element from if_false
.
Trait Implementations
impl AsRef<[u32; 4]> for Vec4Mask
[src]
impl BitAnd<Vec4Mask> for Vec4Mask
[src]
type Output = Vec4Mask
The resulting type after applying the &
operator.
fn bitand(self, other: Vec4Mask) -> Vec4Mask
[src]
impl BitAndAssign<Vec4Mask> for Vec4Mask
[src]
fn bitand_assign(&mut self, other: Vec4Mask)
[src]
impl BitOr<Vec4Mask> for Vec4Mask
[src]
type Output = Vec4Mask
The resulting type after applying the |
operator.
fn bitor(self, other: Vec4Mask) -> Vec4Mask
[src]
impl BitOrAssign<Vec4Mask> for Vec4Mask
[src]
fn bitor_assign(&mut self, other: Vec4Mask)
[src]
impl Clone for Vec4Mask
[src]
impl Copy for Vec4Mask
[src]
impl Debug for Vec4Mask
[src]
impl Default for Vec4Mask
[src]
impl Display for Vec4Mask
[src]
impl Eq for Vec4Mask
[src]
impl Hash for Vec4Mask
[src]
fn hash<H>(&self, state: &mut H) where
H: Hasher,
[src]
H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Not for Vec4Mask
[src]
type Output = Vec4Mask
The resulting type after applying the !
operator.
fn not(self) -> Vec4Mask
[src]
impl Ord for Vec4Mask
[src]
fn cmp(&self, other: &Vec4Mask) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Vec4Mask> for Vec4Mask
[src]
impl PartialOrd<Vec4Mask> for Vec4Mask
[src]
Auto Trait Implementations
impl RefUnwindSafe for Vec4Mask
impl Send for Vec4Mask
impl Sync for Vec4Mask
impl Unpin for Vec4Mask
impl UnwindSafe for Vec4Mask
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,