Struct rapier2d::geometry::InteractionGraph
source · [−]pub struct InteractionGraph<N, E> { /* private fields */ }
Expand description
A graph where nodes are collision objects and edges are contact or proximity algorithms.
Implementations
The underlying raw graph structure of this interaction graph.
All the interactions on this graph.
All the interactions on this graph with the corresponding endpoint weights.
pub fn interaction_pair(
&self,
id1: ColliderGraphIndex,
id2: ColliderGraphIndex
) -> Option<(N, N, &E)>
pub fn interaction_pair(
&self,
id1: ColliderGraphIndex,
id2: ColliderGraphIndex
) -> Option<(N, N, &E)>
The interaction between the two collision objects identified by their graph index.
pub fn interaction_pair_mut(
&mut self,
id1: ColliderGraphIndex,
id2: ColliderGraphIndex
) -> Option<(N, N, &mut E)>
pub fn interaction_pair_mut(
&mut self,
id1: ColliderGraphIndex,
id2: ColliderGraphIndex
) -> Option<(N, N, &mut E)>
The interaction between the two collision objects identified by their graph index.
All the interaction involving the collision object with graph index id
.
Gets the interaction with the given index.
pub fn interactions_with_mut(
&mut self,
id: ColliderGraphIndex
) -> impl Iterator<Item = (N, N, TemporaryInteractionIndex, &mut E)>
pub fn interactions_with_mut(
&mut self,
id: ColliderGraphIndex
) -> impl Iterator<Item = (N, N, TemporaryInteractionIndex, &mut E)>
All the mutable references to interactions involving the collision object with graph index id
.
Trait Implementations
Auto Trait Implementations
impl<N, E> RefUnwindSafe for InteractionGraph<N, E> where
E: RefUnwindSafe,
N: RefUnwindSafe,
impl<N, E> Send for InteractionGraph<N, E> where
E: Send,
N: Send,
impl<N, E> Sync for InteractionGraph<N, E> where
E: Sync,
N: Sync,
impl<N, E> Unpin for InteractionGraph<N, E> where
E: Unpin,
N: Unpin,
impl<N, E> UnwindSafe for InteractionGraph<N, E> where
E: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert 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
. Read more
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
Checks if self
is actually part of its subset T
(and can be converted to it).
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
The inclusion map: converts self
to the equivalent element of its superset.