Enum ncollide2d::world::GeometricQueryType
source · pub enum GeometricQueryType<N: Real> {
Contacts(N, N),
Proximity(N),
}
Expand description
The kind of query a CollisionObject may be involved on.
The following queries are executed for a given pair of GeometricQueryType
associated with two
collision objects:
- Contacts + Contacts = exact contact point coputation.
- Contacts + Proximity = proximity test only.
- Proximity + Proximity = proximity test only.
Variants§
Contacts(N, N)
This objects can respond to both contact point computation and proximity queries.
Proximity(N)
This object can respond to proximity tests only.
Implementations§
source§impl<N: Real> GeometricQueryType<N>
impl<N: Real> GeometricQueryType<N>
sourcepub fn query_limit(&self) -> N
pub fn query_limit(&self) -> N
The numerical distance limit of relevance for this query.
If two objects are separated by a distance greater than the sum of their respective
query_limit
, the corresponding query will not by performed. For proximity queries,
non-intersecting object closer than a distance equal to the sum of their query_limit
will
be reported as Proximity::WithinMargin
.
sourcepub fn contact_queries_to_prediction(
self,
other: Self
) -> Option<ContactPrediction<N>>
pub fn contact_queries_to_prediction(
self,
other: Self
) -> Option<ContactPrediction<N>>
Given two contact query types, returns the corresponding contact prediction parameters.
Returns None
if any of self
or other
is not a GeometricQueryType::Contacts
.
sourcepub fn is_contacts_query(&self) -> bool
pub fn is_contacts_query(&self) -> bool
Returns true
if this is a contacts query type.
sourcepub fn is_proximity_query(&self) -> bool
pub fn is_proximity_query(&self) -> bool
Returns true
if this is a proximity query type.
Trait Implementations§
source§impl<N: Clone + Real> Clone for GeometricQueryType<N>
impl<N: Clone + Real> Clone for GeometricQueryType<N>
source§fn clone(&self) -> GeometricQueryType<N>
fn clone(&self) -> GeometricQueryType<N>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<N: PartialEq + Real> PartialEq<GeometricQueryType<N>> for GeometricQueryType<N>
impl<N: PartialEq + Real> PartialEq<GeometricQueryType<N>> for GeometricQueryType<N>
source§fn eq(&self, other: &GeometricQueryType<N>) -> bool
fn eq(&self, other: &GeometricQueryType<N>) -> bool
impl<N: Copy + Real> Copy for GeometricQueryType<N>
impl<N: Real> StructuralPartialEq for GeometricQueryType<N>
Auto Trait Implementations§
impl<N> RefUnwindSafe for GeometricQueryType<N>where
N: RefUnwindSafe,
impl<N> Send for GeometricQueryType<N>
impl<N> Sync for GeometricQueryType<N>
impl<N> Unpin for GeometricQueryType<N>where
N: Unpin,
impl<N> UnwindSafe for GeometricQueryType<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>
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.