pub struct PyBodyFilter {
pub include_active: bool,
pub include_sleeping: bool,
pub include_static: bool,
pub include_kinematic: bool,
}Expand description
Filter criteria for selecting bodies.
Fields§
§include_active: boolInclude active (awake) bodies.
include_sleeping: boolInclude sleeping bodies.
include_static: boolInclude static bodies.
include_kinematic: boolInclude kinematic bodies.
Implementations§
Source§impl PyBodyFilter
impl PyBodyFilter
Sourcepub fn active_dynamic() -> Self
pub fn active_dynamic() -> Self
Filter that matches only dynamic active bodies.
Sourcepub fn matches(&self, body: &PyRigidBody) -> bool
pub fn matches(&self, body: &PyRigidBody) -> bool
Test if a body passes this filter.
Sourcepub fn filter_by_type<'a>(
&self,
bodies: &'a PyRigidBodySet,
) -> Vec<&'a PyRigidBody>
pub fn filter_by_type<'a>( &self, bodies: &'a PyRigidBodySet, ) -> Vec<&'a PyRigidBody>
Filter a body set; returns matching body ids.
Trait Implementations§
Source§impl Clone for PyBodyFilter
impl Clone for PyBodyFilter
Source§fn clone(&self) -> PyBodyFilter
fn clone(&self) -> PyBodyFilter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PyBodyFilter
impl Debug for PyBodyFilter
Source§impl Default for PyBodyFilter
impl Default for PyBodyFilter
Source§fn default() -> PyBodyFilter
fn default() -> PyBodyFilter
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PyBodyFilter
impl<'de> Deserialize<'de> for PyBodyFilter
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PyBodyFilter
impl RefUnwindSafe for PyBodyFilter
impl Send for PyBodyFilter
impl Sync for PyBodyFilter
impl Unpin for PyBodyFilter
impl UnsafeUnpin for PyBodyFilter
impl UnwindSafe for PyBodyFilter
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.