Struct ncollide2d::query::Contact
source · pub struct Contact<N: Real> {
pub world1: Point<N>,
pub world2: Point<N>,
pub normal: Unit<Vector<N>>,
pub depth: N,
}
Expand description
Geometric description of a contact.
Fields§
§world1: Point<N>
Position of the contact on the first object. The position is expressed in world space.
world2: Point<N>
Position of the contact on the second object. The position is expressed in world space.
normal: Unit<Vector<N>>
Contact normal
depth: N
Penetration depth
Implementations§
Trait Implementations§
source§impl<N: PartialEq + Real> PartialEq<Contact<N>> for Contact<N>
impl<N: PartialEq + Real> PartialEq<Contact<N>> for Contact<N>
impl<N: Real> StructuralPartialEq for Contact<N>
Auto Trait Implementations§
impl<N> RefUnwindSafe for Contact<N>where
N: RefUnwindSafe,
impl<N> Send for Contact<N>
impl<N> Sync for Contact<N>
impl<N> Unpin for Contact<N>where
N: Unpin,
impl<N> UnwindSafe for Contact<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.