Struct physx::articulation_cache::ArticulationCacheFlags
source · pub struct ArticulationCacheFlags { /* private fields */ }
Expand description
Flags for PxArticulationCacheFlag
Implementations§
source§impl PxArticulationCacheFlags
impl PxArticulationCacheFlags
pub const Velocity: PxArticulationCacheFlags = Self{ bits: 1 << 0,}
pub const Acceleration: PxArticulationCacheFlags = Self{ bits: 1 << 1,}
pub const Position: PxArticulationCacheFlags = Self{ bits: 1 << 2,}
pub const Force: PxArticulationCacheFlags = Self{ bits: 1 << 3,}
pub const LinkVelocity: PxArticulationCacheFlags = Self{ bits: 1 << 4,}
pub const LinkAcceleration: PxArticulationCacheFlags = Self{ bits: 1 << 5,}
pub const RootTransform: PxArticulationCacheFlags = Self{ bits: 1 << 6,}
pub const RootVelocities: PxArticulationCacheFlags = Self{ bits: 1 << 7,}
pub const SensorForces: PxArticulationCacheFlags = Self{ bits: 1 << 8,}
pub const JointSolverForces: PxArticulationCacheFlags = Self{ bits: 1 << 9,}
pub const All: PxArticulationCacheFlags = Self{ bits: Self::Velocity.bits | Self::Acceleration.bits | Self::Position.bits | Self::LinkVelocity.bits | Self::LinkAcceleration.bits | Self::RootTransform.bits | Self::RootVelocities.bits,}
sourcepub const fn empty() -> PxArticulationCacheFlags
pub const fn empty() -> PxArticulationCacheFlags
Returns an empty set of flags.
sourcepub const fn all() -> PxArticulationCacheFlags
pub const fn all() -> PxArticulationCacheFlags
Returns the set containing all flags.
sourcepub const fn from_bits(bits: u32) -> Option<PxArticulationCacheFlags>
pub const fn from_bits(bits: u32) -> Option<PxArticulationCacheFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
sourcepub const fn from_bits_truncate(bits: u32) -> PxArticulationCacheFlags
pub const fn from_bits_truncate(bits: u32) -> PxArticulationCacheFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> PxArticulationCacheFlags
pub const unsafe fn from_bits_unchecked(bits: u32) -> PxArticulationCacheFlags
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Safety
The caller of the bitflags!
macro can chose to allow or
disallow extra bits for their bitflags type.
The caller of from_bits_unchecked()
has to ensure that
all bits correspond to a defined flag or that extra bits
are valid for this bitflags type.
sourcepub const fn intersects(&self, other: PxArticulationCacheFlags) -> bool
pub const fn intersects(&self, other: PxArticulationCacheFlags) -> bool
Returns true
if there are flags common to both self
and other
.
sourcepub const fn contains(&self, other: PxArticulationCacheFlags) -> bool
pub const fn contains(&self, other: PxArticulationCacheFlags) -> bool
Returns true
if all of the flags in other
are contained within self
.
sourcepub fn insert(&mut self, other: PxArticulationCacheFlags)
pub fn insert(&mut self, other: PxArticulationCacheFlags)
Inserts the specified flags in-place.
sourcepub fn remove(&mut self, other: PxArticulationCacheFlags)
pub fn remove(&mut self, other: PxArticulationCacheFlags)
Removes the specified flags in-place.
sourcepub fn toggle(&mut self, other: PxArticulationCacheFlags)
pub fn toggle(&mut self, other: PxArticulationCacheFlags)
Toggles the specified flags in-place.
sourcepub fn set(&mut self, other: PxArticulationCacheFlags, value: bool)
pub fn set(&mut self, other: PxArticulationCacheFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
sourcepub const fn intersection(
self,
other: PxArticulationCacheFlags
) -> PxArticulationCacheFlags
pub const fn intersection( self, other: PxArticulationCacheFlags ) -> PxArticulationCacheFlags
Returns the intersection between the flags in self
and
other
.
Specifically, the returned set contains only the flags which are
present in both self
and other
.
This is equivalent to using the &
operator (e.g.
ops::BitAnd
), as in flags & other
.
sourcepub const fn union(
self,
other: PxArticulationCacheFlags
) -> PxArticulationCacheFlags
pub const fn union( self, other: PxArticulationCacheFlags ) -> PxArticulationCacheFlags
Returns the union of between the flags in self
and other
.
Specifically, the returned set contains all flags which are
present in either self
or other
, including any which are
present in both (see Self::symmetric_difference
if that
is undesirable).
This is equivalent to using the |
operator (e.g.
ops::BitOr
), as in flags | other
.
sourcepub const fn difference(
self,
other: PxArticulationCacheFlags
) -> PxArticulationCacheFlags
pub const fn difference( self, other: PxArticulationCacheFlags ) -> PxArticulationCacheFlags
Returns the difference between the flags in self
and other
.
Specifically, the returned set contains all flags present in
self
, except for the ones present in other
.
It is also conceptually equivalent to the “bit-clear” operation:
flags & !other
(and this syntax is also supported).
This is equivalent to using the -
operator (e.g.
ops::Sub
), as in flags - other
.
sourcepub const fn symmetric_difference(
self,
other: PxArticulationCacheFlags
) -> PxArticulationCacheFlags
pub const fn symmetric_difference( self, other: PxArticulationCacheFlags ) -> PxArticulationCacheFlags
Returns the symmetric difference between the flags
in self
and other
.
Specifically, the returned set contains the flags present which
are present in self
or other
, but that are not present in
both. Equivalently, it contains the flags present in exactly
one of the sets self
and other
.
This is equivalent to using the ^
operator (e.g.
ops::BitXor
), as in flags ^ other
.
sourcepub const fn complement(self) -> PxArticulationCacheFlags
pub const fn complement(self) -> PxArticulationCacheFlags
Returns the complement of this set of flags.
Specifically, the returned set contains all the flags which are
not set in self
, but which are allowed for this type.
Alternatively, it can be thought of as the set difference
between Self::all()
and self
(e.g. Self::all() - self
)
This is equivalent to using the !
operator (e.g.
ops::Not
), as in !flags
.
Trait Implementations§
source§impl Binary for PxArticulationCacheFlags
impl Binary for PxArticulationCacheFlags
source§impl BitAnd<PxArticulationCacheFlags> for PxArticulationCacheFlags
impl BitAnd<PxArticulationCacheFlags> for PxArticulationCacheFlags
source§fn bitand(self, other: PxArticulationCacheFlags) -> PxArticulationCacheFlags
fn bitand(self, other: PxArticulationCacheFlags) -> PxArticulationCacheFlags
Returns the intersection between the two sets of flags.
§type Output = PxArticulationCacheFlags
type Output = PxArticulationCacheFlags
&
operator.source§impl BitAndAssign<PxArticulationCacheFlags> for PxArticulationCacheFlags
impl BitAndAssign<PxArticulationCacheFlags> for PxArticulationCacheFlags
source§fn bitand_assign(&mut self, other: PxArticulationCacheFlags)
fn bitand_assign(&mut self, other: PxArticulationCacheFlags)
Disables all flags disabled in the set.
source§impl BitOr<PxArticulationCacheFlags> for PxArticulationCacheFlags
impl BitOr<PxArticulationCacheFlags> for PxArticulationCacheFlags
source§fn bitor(self, other: PxArticulationCacheFlags) -> PxArticulationCacheFlags
fn bitor(self, other: PxArticulationCacheFlags) -> PxArticulationCacheFlags
Returns the union of the two sets of flags.
§type Output = PxArticulationCacheFlags
type Output = PxArticulationCacheFlags
|
operator.source§impl BitOrAssign<PxArticulationCacheFlags> for PxArticulationCacheFlags
impl BitOrAssign<PxArticulationCacheFlags> for PxArticulationCacheFlags
source§fn bitor_assign(&mut self, other: PxArticulationCacheFlags)
fn bitor_assign(&mut self, other: PxArticulationCacheFlags)
Adds the set of flags.
source§impl BitXor<PxArticulationCacheFlags> for PxArticulationCacheFlags
impl BitXor<PxArticulationCacheFlags> for PxArticulationCacheFlags
source§fn bitxor(self, other: PxArticulationCacheFlags) -> PxArticulationCacheFlags
fn bitxor(self, other: PxArticulationCacheFlags) -> PxArticulationCacheFlags
Returns the left flags, but with all the right flags toggled.
§type Output = PxArticulationCacheFlags
type Output = PxArticulationCacheFlags
^
operator.source§impl BitXorAssign<PxArticulationCacheFlags> for PxArticulationCacheFlags
impl BitXorAssign<PxArticulationCacheFlags> for PxArticulationCacheFlags
source§fn bitxor_assign(&mut self, other: PxArticulationCacheFlags)
fn bitxor_assign(&mut self, other: PxArticulationCacheFlags)
Toggles the set of flags.
source§impl Clone for PxArticulationCacheFlags
impl Clone for PxArticulationCacheFlags
source§fn clone(&self) -> PxArticulationCacheFlags
fn clone(&self) -> PxArticulationCacheFlags
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PxArticulationCacheFlags
impl Debug for PxArticulationCacheFlags
source§impl Default for PxArticulationCacheFlags
impl Default for PxArticulationCacheFlags
source§fn default() -> PxArticulationCacheFlags
fn default() -> PxArticulationCacheFlags
source§impl Extend<PxArticulationCacheFlags> for PxArticulationCacheFlags
impl Extend<PxArticulationCacheFlags> for PxArticulationCacheFlags
source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = PxArticulationCacheFlags>,
fn extend<T>(&mut self, iterator: T)where T: IntoIterator<Item = PxArticulationCacheFlags>,
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 FromIterator<PxArticulationCacheFlags> for PxArticulationCacheFlags
impl FromIterator<PxArticulationCacheFlags> for PxArticulationCacheFlags
source§fn from_iter<T>(iterator: T) -> PxArticulationCacheFlagswhere
T: IntoIterator<Item = PxArticulationCacheFlags>,
fn from_iter<T>(iterator: T) -> PxArticulationCacheFlagswhere T: IntoIterator<Item = PxArticulationCacheFlags>,
source§impl Hash for PxArticulationCacheFlags
impl Hash for PxArticulationCacheFlags
source§impl LowerHex for PxArticulationCacheFlags
impl LowerHex for PxArticulationCacheFlags
source§impl Not for PxArticulationCacheFlags
impl Not for PxArticulationCacheFlags
source§fn not(self) -> PxArticulationCacheFlags
fn not(self) -> PxArticulationCacheFlags
Returns the complement of this set of flags.
§type Output = PxArticulationCacheFlags
type Output = PxArticulationCacheFlags
!
operator.source§impl Octal for PxArticulationCacheFlags
impl Octal for PxArticulationCacheFlags
source§impl Ord for PxArticulationCacheFlags
impl Ord for PxArticulationCacheFlags
source§fn cmp(&self, other: &PxArticulationCacheFlags) -> Ordering
fn cmp(&self, other: &PxArticulationCacheFlags) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<PxArticulationCacheFlags> for PxArticulationCacheFlags
impl PartialEq<PxArticulationCacheFlags> for PxArticulationCacheFlags
source§fn eq(&self, other: &PxArticulationCacheFlags) -> bool
fn eq(&self, other: &PxArticulationCacheFlags) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<PxArticulationCacheFlags> for PxArticulationCacheFlags
impl PartialOrd<PxArticulationCacheFlags> for PxArticulationCacheFlags
source§fn partial_cmp(&self, other: &PxArticulationCacheFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &PxArticulationCacheFlags) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Sub<PxArticulationCacheFlags> for PxArticulationCacheFlags
impl Sub<PxArticulationCacheFlags> for PxArticulationCacheFlags
source§fn sub(self, other: PxArticulationCacheFlags) -> PxArticulationCacheFlags
fn sub(self, other: PxArticulationCacheFlags) -> PxArticulationCacheFlags
Returns the set difference of the two sets of flags.
§type Output = PxArticulationCacheFlags
type Output = PxArticulationCacheFlags
-
operator.source§impl SubAssign<PxArticulationCacheFlags> for PxArticulationCacheFlags
impl SubAssign<PxArticulationCacheFlags> for PxArticulationCacheFlags
source§fn sub_assign(&mut self, other: PxArticulationCacheFlags)
fn sub_assign(&mut self, other: PxArticulationCacheFlags)
Disables all flags enabled in the set.