pub enum GeometricQueryType<N: RealField + Copy> {
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: RealField + Copy> GeometricQueryType<N>
impl<N: RealField + Copy> 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 + RealField + Copy> Clone for GeometricQueryType<N>
impl<N: Clone + RealField + Copy> 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 moreimpl<N: Copy + RealField + Copy> Copy for GeometricQueryType<N>
impl<N: RealField + Copy> StructuralPartialEq for GeometricQueryType<N>
Auto Trait Implementations§
impl<N> Freeze for GeometricQueryType<N>where
N: Freeze,
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<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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§fn to_subset_unchecked(&self) -> SS
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.