Struct ark_api::world::EntityLayerMask
source · [−]#[repr(transparent)]pub struct EntityLayerMask(_);Expand description
Represents an entity layer filter that can be used with entity queries or raycasts.
Implementations
sourceimpl EntityLayerMask
impl EntityLayerMask
sourcepub const fn layer(layer: usize) -> Self
pub const fn layer(layer: usize) -> Self
Returns a new mask that includes only the given layer.
sourcepub const fn with(self, other: EntityLayerMask) -> Self
pub const fn with(self, other: EntityLayerMask) -> Self
Returns a new mask that includes the union of the layers of this mask and the other mask.
sourcepub const fn except(self, other: EntityLayerMask) -> Self
pub const fn except(self, other: EntityLayerMask) -> Self
Returns a new mask that includes the layers that this mask includes except the ones in the other mask.
sourcepub const fn with_layer(self, layer: usize) -> Self
pub const fn with_layer(self, layer: usize) -> Self
Returns a new mask that also includes the given layer.
sourcepub const fn except_layer(self, layer: usize) -> Self
pub const fn except_layer(self, layer: usize) -> Self
Returns a new mask that excludes the given layer. If the layer was already excluded from the mask this has no effect.
sourcepub const fn from_value(value: u64) -> Self
pub const fn from_value(value: u64) -> Self
Create from a raw mask value.
sourcepub const fn value(&self) -> u64
pub const fn value(&self) -> u64
Returns the raw mask value. Bits set to 1 indicate that the layer should be included.
sourcepub const fn everything() -> Self
pub const fn everything() -> Self
All layers.
Trait Implementations
sourceimpl BitOr<EntityLayerMask> for EntityLayerMask
impl BitOr<EntityLayerMask> for EntityLayerMask
sourcefn bitor(self, rhs: Self) -> Self::Output
fn bitor(self, rhs: Self) -> Self::Output
Returns a new mask that includes the union of the layers of this mask and the other mask.
Identical to EntityLayerMask::with.
type Output = EntityLayerMask
type Output = EntityLayerMask
| operator.sourceimpl BitOrAssign<EntityLayerMask> for EntityLayerMask
impl BitOrAssign<EntityLayerMask> for EntityLayerMask
sourcefn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Returns a new mask that includes the union of the layers of this mask and the other mask.
Identical to EntityLayerMask::with.
sourceimpl Clone for EntityLayerMask
impl Clone for EntityLayerMask
sourcefn clone(&self) -> EntityLayerMask
fn clone(&self) -> EntityLayerMask
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more