Struct ncollide2d::query::TrackedContact
source · pub struct TrackedContact<N: Real> {
pub contact: Contact<N>,
pub kinematic: ContactKinematic<N>,
pub id: GenerationalId,
}
Expand description
A contact combined with contact kinematic information as well as a persistant identifier.
When ncollide is used to compute contact points between moving solids, it will attempt to
match contact points found at successive frames. Two contact points are said to “match” if
they can be seen as the same contact point that moved in-between frames. Two matching
contact points are given the same id
here.
Fields§
§contact: Contact<N>
The geometric contact information.
kinematic: ContactKinematic<N>
The local contact kinematic.
id: GenerationalId
The identifier of this contact.
Implementations§
source§impl<N: Real> TrackedContact<N>
impl<N: Real> TrackedContact<N>
sourcepub fn new(
contact: Contact<N>,
kinematic: ContactKinematic<N>,
id: GenerationalId
) -> Self
pub fn new(
contact: Contact<N>,
kinematic: ContactKinematic<N>,
id: GenerationalId
) -> Self
Creates a new tracked contact.
Trait Implementations§
Auto Trait Implementations§
impl<N> RefUnwindSafe for TrackedContact<N>where
N: RefUnwindSafe,
impl<N> Send for TrackedContact<N>
impl<N> Sync for TrackedContact<N>
impl<N> Unpin for TrackedContact<N>where
N: Unpin,
impl<N> UnwindSafe for TrackedContact<N>where
N: UnwindSafe,
Blanket Implementations§
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§unsafe fn to_subset_unchecked(&self) -> SS
unsafe 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.