Struct re_renderer::renderer::lines::LineStripFlags
source · #[repr(C)]pub struct LineStripFlags(<LineStripFlags as PublicFlags>::Internal);
Expand description
Property flags for a line strip
Needs to be kept in sync with lines.wgsl
Tuple Fields§
§0: <LineStripFlags as PublicFlags>::Internal
Implementations§
source§impl LineStripFlags
impl LineStripFlags
sourcepub const FLAG_CAP_END_TRIANGLE: Self = _
pub const FLAG_CAP_END_TRIANGLE: Self = _
Puts a equilateral triangle at the end of the line strip (excludes other end caps).
sourcepub const FLAG_CAP_END_ROUND: Self = _
pub const FLAG_CAP_END_ROUND: Self = _
Adds a round cap at the end of a line strip (excludes other end caps).
sourcepub const FLAG_CAP_END_EXTEND_OUTWARDS: Self = _
pub const FLAG_CAP_END_EXTEND_OUTWARDS: Self = _
By default, line caps end at the last/first position of the line strip. This flag makes end caps extend outwards.
sourcepub const FLAG_CAP_START_TRIANGLE: Self = _
pub const FLAG_CAP_START_TRIANGLE: Self = _
Puts a equilateral triangle at the start of the line strip (excludes other start caps).
sourcepub const FLAG_CAP_START_ROUND: Self = _
pub const FLAG_CAP_START_ROUND: Self = _
Adds a round cap at the start of a line strip (excludes other start caps).
sourcepub const FLAG_CAP_START_EXTEND_OUTWARDS: Self = _
pub const FLAG_CAP_START_EXTEND_OUTWARDS: Self = _
By default, line caps end at the last/first position of the line strip. This flag makes end caps extend outwards.
sourcepub const FLAG_COLOR_GRADIENT: Self = _
pub const FLAG_COLOR_GRADIENT: Self = _
Enable color gradient across the line.
TODO(andreas): Could be moved to per batch flags.
sourcepub const FLAG_FORCE_ORTHO_SPANNING: Self = _
pub const FLAG_FORCE_ORTHO_SPANNING: Self = _
Forces spanning the line’s quads as-if the camera was orthographic.
This is useful for lines that are on a plane that is parallel to the camera: Without this flag, the lines will poke through the camera plane as they orient themselves towards the camera. Note that since distances to the camera are computed differently in orthographic mode, this changes how screen space sizes are computed.
TODO(andreas): Could be moved to per batch flags.
sourcepub const FLAGS_OUTWARD_EXTENDING_ROUND_CAPS: Self = _
pub const FLAGS_OUTWARD_EXTENDING_ROUND_CAPS: Self = _
Combination of flags to extend lines outwards with round caps.
source§impl LineStripFlags
impl LineStripFlags
sourcepub const fn bits(&self) -> u8
pub const fn bits(&self) -> u8
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
sourcepub const fn from_bits(bits: u8) -> Option<Self>
pub const fn from_bits(bits: u8) -> Option<Self>
Convert from a bits value.
This method will return None
if any unknown bits are set.
sourcepub const fn from_bits_truncate(bits: u8) -> Self
pub const fn from_bits_truncate(bits: u8) -> Self
Convert from a bits value, unsetting any unknown bits.
sourcepub const fn from_bits_retain(bits: u8) -> Self
pub const fn from_bits_retain(bits: u8) -> Self
Convert from a bits value exactly.
sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
Get a flags value with the bits of a flag with the given name set.
This method will return None
if name
is empty or doesn’t
correspond to any named flag.
sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
sourcepub fn remove(&mut self, other: Self)
pub fn remove(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
remove
won’t truncate other
, but the !
operator will.
sourcepub fn toggle(&mut self, other: Self)
pub fn toggle(&mut self, other: Self)
The bitwise exclusive-or (^
) of the bits in two flags values.
sourcepub fn set(&mut self, other: Self, value: bool)
pub fn set(&mut self, other: Self, value: bool)
Call insert
when value
is true
or remove
when value
is false
.
sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
The bitwise and (&
) of the bits in two flags values.
sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
The bitwise or (|
) of the bits in two flags values.
sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
The bitwise exclusive-or (^
) of the bits in two flags values.
sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
The bitwise negation (!
) of the bits in a flags value, truncating the result.
source§impl LineStripFlags
impl LineStripFlags
sourcepub const fn iter(&self) -> Iter<LineStripFlags>
pub const fn iter(&self) -> Iter<LineStripFlags>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
sourcepub const fn iter_names(&self) -> IterNames<LineStripFlags>
pub const fn iter_names(&self) -> IterNames<LineStripFlags>
Yield a set of contained named flags values.
This method is like iter
, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
source§impl Binary for LineStripFlags
impl Binary for LineStripFlags
source§impl BitAnd for LineStripFlags
impl BitAnd for LineStripFlags
source§impl BitAndAssign for LineStripFlags
impl BitAndAssign for LineStripFlags
source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
The bitwise and (&
) of the bits in two flags values.
source§impl BitOr for LineStripFlags
impl BitOr for LineStripFlags
source§fn bitor(self, other: LineStripFlags) -> Self
fn bitor(self, other: LineStripFlags) -> Self
The bitwise or (|
) of the bits in two flags values.
§type Output = LineStripFlags
type Output = LineStripFlags
|
operator.source§impl BitOrAssign for LineStripFlags
impl BitOrAssign for LineStripFlags
source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
The bitwise or (|
) of the bits in two flags values.
source§impl BitXor for LineStripFlags
impl BitXor for LineStripFlags
source§impl BitXorAssign for LineStripFlags
impl BitXorAssign for LineStripFlags
source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
The bitwise exclusive-or (^
) of the bits in two flags values.
source§impl Clone for LineStripFlags
impl Clone for LineStripFlags
source§fn clone(&self) -> LineStripFlags
fn clone(&self) -> LineStripFlags
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for LineStripFlags
impl Default for LineStripFlags
source§fn default() -> LineStripFlags
fn default() -> LineStripFlags
source§impl Extend<LineStripFlags> for LineStripFlags
impl Extend<LineStripFlags> for LineStripFlags
source§fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
The bitwise or (|
) of the bits in each flags value.
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)source§impl Flags for LineStripFlags
impl Flags for LineStripFlags
source§const FLAGS: &'static [Flag<LineStripFlags>] = _
const FLAGS: &'static [Flag<LineStripFlags>] = _
source§fn from_bits_retain(bits: u8) -> LineStripFlags
fn from_bits_retain(bits: u8) -> LineStripFlags
§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|
) of the bits in two flags values.§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!
). Read more§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^
) of the bits in two flags values.§fn set(&mut self, other: Self, value: bool)where
Self: Sized,
fn set(&mut self, other: Self, value: bool)where
Self: Sized,
Flags::insert
] when value
is true
or [Flags::remove
] when value
is false
.§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&
) of the bits in two flags values.§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!
). Read more§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^
) of the bits in two flags values.§fn complement(self) -> Self
fn complement(self) -> Self
!
) of the bits in a flags value, truncating the result.source§impl FromIterator<LineStripFlags> for LineStripFlags
impl FromIterator<LineStripFlags> for LineStripFlags
source§fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
The bitwise or (|
) of the bits in each flags value.
source§impl IntoIterator for LineStripFlags
impl IntoIterator for LineStripFlags
source§impl LowerHex for LineStripFlags
impl LowerHex for LineStripFlags
source§impl Not for LineStripFlags
impl Not for LineStripFlags
source§impl Octal for LineStripFlags
impl Octal for LineStripFlags
source§impl PublicFlags for LineStripFlags
impl PublicFlags for LineStripFlags
source§impl Sub for LineStripFlags
impl Sub for LineStripFlags
source§fn sub(self, other: Self) -> Self
fn sub(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
§type Output = LineStripFlags
type Output = LineStripFlags
-
operator.source§impl SubAssign for LineStripFlags
impl SubAssign for LineStripFlags
source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
source§impl UpperHex for LineStripFlags
impl UpperHex for LineStripFlags
impl Copy for LineStripFlags
impl Pod for LineStripFlags
Auto Trait Implementations§
impl Freeze for LineStripFlags
impl RefUnwindSafe for LineStripFlags
impl Send for LineStripFlags
impl Sync for LineStripFlags
impl Unpin for LineStripFlags
impl UnwindSafe for LineStripFlags
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
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self
.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more