Struct rapier2d::geometry::InteractionGraph[][src]

pub struct InteractionGraph<N, E> { /* fields omitted */ }

A graph where nodes are collision objects and edges are contact or proximity algorithms.

Implementations

impl<N: Copy, E> InteractionGraph<N, E>[src]

pub fn new() -> Self[src]

Creates a new empty collection of collision objects.

pub fn raw_graph(&self) -> &Graph<N, E>[src]

The underlying raw graph structure of this interaction graph.

pub fn interactions(&self) -> impl Iterator<Item = &E>[src]

All the interactions on this graph.

pub fn interactions_with_endpoints(&self) -> impl Iterator<Item = (N, N, &E)>[src]

All the interactions on this graph with the corresponding endpoint weights.

pub fn interaction_pair(
    &self,
    id1: ColliderGraphIndex,
    id2: ColliderGraphIndex
) -> Option<(N, N, &E)>
[src]

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)>
[src]

The interaction between the two collision objects identified by their graph index.

pub fn interactions_with(
    &self,
    id: ColliderGraphIndex
) -> impl Iterator<Item = (N, N, &E)>
[src]

All the interaction involving the collision object with graph index id.

pub fn index_interaction(
    &self,
    id: TemporaryInteractionIndex
) -> Option<(N, N, &E)>
[src]

Gets the interaction with the given index.

pub fn interactions_with_mut(
    &mut self,
    id: ColliderGraphIndex
) -> impl Iterator<Item = (N, N, TemporaryInteractionIndex, &mut E)>
[src]

All the mutable references to interactions involving the collision object with graph index id.

Trait Implementations

impl<N: Clone, E: Clone> Clone for InteractionGraph<N, E>[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,