[−][src]Struct bevy_math::Vec3Mask
A 3-dimensional vector mask.
Implementations
impl Vec3Mask
[src]
pub fn new(x: bool, y: bool, z: bool) -> Vec3Mask
[src]
Creates a new Vec3Mask
.
pub fn bitmask(&self) -> u32
[src]
Returns a bitmask with the lowest three bits set from the elements of
the Vec3Mask
.
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
.
pub fn all(&self) -> bool
[src]
Returns true if all the elements are true, false otherwise.
In other words: x && y && z
.
pub fn select(self, if_true: Vec3, if_false: Vec3) -> Vec3
[src]
Creates a new Vec3
from the elements in if_true
and if_false
,
selecting which to use for each element based on the Vec3Mask
.
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; 3]> for Vec3Mask
[src]
impl BitAnd<Vec3Mask> for Vec3Mask
[src]
type Output = Vec3Mask
The resulting type after applying the &
operator.
fn bitand(self, other: Vec3Mask) -> Vec3Mask
[src]
impl BitAndAssign<Vec3Mask> for Vec3Mask
[src]
fn bitand_assign(&mut self, other: Vec3Mask)
[src]
impl BitOr<Vec3Mask> for Vec3Mask
[src]
type Output = Vec3Mask
The resulting type after applying the |
operator.
fn bitor(self, other: Vec3Mask) -> Vec3Mask
[src]
impl BitOrAssign<Vec3Mask> for Vec3Mask
[src]
fn bitor_assign(&mut self, other: Vec3Mask)
[src]
impl Clone for Vec3Mask
[src]
impl Copy for Vec3Mask
[src]
impl Debug for Vec3Mask
[src]
impl Default for Vec3Mask
[src]
impl Display for Vec3Mask
[src]
impl Eq for Vec3Mask
[src]
impl Hash for Vec3Mask
[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 Vec3Mask
[src]
type Output = Vec3Mask
The resulting type after applying the !
operator.
fn not(self) -> Vec3Mask
[src]
impl Ord for Vec3Mask
[src]
fn cmp(&self, other: &Vec3Mask) -> 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<Vec3Mask> for Vec3Mask
[src]
impl PartialOrd<Vec3Mask> for Vec3Mask
[src]
Auto Trait Implementations
impl RefUnwindSafe for Vec3Mask
impl Send for Vec3Mask
impl Sync for Vec3Mask
impl Unpin for Vec3Mask
impl UnwindSafe for Vec3Mask
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>,