[][src]Struct bevy_math::Vec3AMask

#[repr(C)]pub struct Vec3AMask(_);

A 3-dimensional vector mask.

This type is typically created by comparison methods on Vec3A. It is essentially a vector of three boolean values.

Implementations

impl Vec3AMask[src]

pub fn new(x: bool, y: bool, z: bool) -> Vec3AMask[src]

Creates a new Vec3AMask.

pub fn bitmask(&self) -> u32[src]

Returns a bitmask with the lowest three bits set from the elements of the Vec3AMask.

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: Vec3A, if_false: Vec3A) -> Vec3A[src]

Creates a new Vec3A from the elements in if_true and if_false, selecting which to use for each element based on the Vec3AMask.

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 Vec3AMask[src]

impl BitAnd<Vec3AMask> for Vec3AMask[src]

type Output = Vec3AMask

The resulting type after applying the & operator.

impl BitAndAssign<Vec3AMask> for Vec3AMask[src]

impl BitOr<Vec3AMask> for Vec3AMask[src]

type Output = Vec3AMask

The resulting type after applying the | operator.

impl BitOrAssign<Vec3AMask> for Vec3AMask[src]

impl Clone for Vec3AMask[src]

impl Copy for Vec3AMask[src]

impl Debug for Vec3AMask[src]

impl Default for Vec3AMask[src]

impl Display for Vec3AMask[src]

impl Eq for Vec3AMask[src]

impl Hash for Vec3AMask[src]

impl Not for Vec3AMask[src]

type Output = Vec3AMask

The resulting type after applying the ! operator.

impl Ord for Vec3AMask[src]

impl PartialEq<Vec3AMask> for Vec3AMask[src]

impl PartialOrd<Vec3AMask> for Vec3AMask[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.