[][src]Struct ncollide2d::narrow_phase::InteractionGraph

pub struct InteractionGraph<N: RealField> { /* fields omitted */ }

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

Methods

impl<N: RealField> InteractionGraph<N>[src]

pub fn new() -> Self[src]

Creates a new empty collection of collision objects.

pub fn raw_graph(
    &self
) -> &UnGraph<CollisionObjectHandle, Interaction<N>, usize>
[src]

The raw underlying graph from the petgraph crate.

pub fn into_inner(self) -> UnGraph<CollisionObjectHandle, Interaction<N>, usize>[src]

Convents this interaction graph into the raw graph from the petgraph crate.

pub fn insert(&mut self, handle: CollisionObjectHandle) -> InteractionGraphIndex[src]

Inserts a new collision object into this collection and returns the corresponding handle.

pub fn remove(
    &mut self,
    id: InteractionGraphIndex
) -> Option<CollisionObjectHandle>
[src]

Removes from this collection the collision object identified by the given handle.

The removed collision object structure is returned.

pub fn interaction_pairs(
    &self,
    effective_only: bool
) -> impl Iterator<Item = (CollisionObjectHandle, CollisionObjectHandle, &Interaction<N>)>
[src]

All the interactions pairs on this graph.

Refer to the official user guide for details.

pub fn contact_pairs(
    &self,
    effective_only: bool
) -> impl Iterator<Item = (CollisionObjectHandle, CollisionObjectHandle, &ContactAlgorithm<N>, &ContactManifold<N>)>
[src]

All the contact pairs on this graph.

Refer to the official user guide for details.

pub fn proximity_pairs(
    &self,
    effective_only: bool
) -> impl Iterator<Item = (CollisionObjectHandle, CollisionObjectHandle, &ProximityAlgorithm<N>)>
[src]

All the proximity pairs on this graph.

Refer to the official user guide for details.

pub fn interaction_pair(
    &self,
    id1: InteractionGraphIndex,
    id2: InteractionGraphIndex,
    effective_only: bool
) -> Option<(CollisionObjectHandle, CollisionObjectHandle, &Interaction<N>)>
[src]

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

Refer to the official user guide for details.

pub fn contact_pair(
    &self,
    id1: InteractionGraphIndex,
    id2: InteractionGraphIndex,
    effective_only: bool
) -> Option<(CollisionObjectHandle, CollisionObjectHandle, &ContactAlgorithm<N>, &ContactManifold<N>)>
[src]

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

Refer to the official user guide for details.

pub fn proximity_pair(
    &self,
    id1: InteractionGraphIndex,
    id2: InteractionGraphIndex,
    effective_only: bool
) -> Option<(CollisionObjectHandle, CollisionObjectHandle, &ProximityAlgorithm<N>)>
[src]

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

Refer to the official user guide for details.

pub fn interactions_with(
    &self,
    id: InteractionGraphIndex,
    effective_only: bool
) -> impl Iterator<Item = (CollisionObjectHandle, CollisionObjectHandle, &Interaction<N>)>
[src]

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

Refer to the official user guide for details.

pub fn proximities_with(
    &self,
    handle: InteractionGraphIndex,
    effective_only: bool
) -> impl Iterator<Item = (CollisionObjectHandle, CollisionObjectHandle, &ProximityAlgorithm<N>)>
[src]

All the proximity pairs involving the collision object with graph index id.

Refer to the official user guide for details.

pub fn contacts_with(
    &self,
    handle: InteractionGraphIndex,
    effective_only: bool
) -> impl Iterator<Item = (CollisionObjectHandle, CollisionObjectHandle, &ContactAlgorithm<N>, &ContactManifold<N>)>
[src]

All the contact pairs involving the collision object with graph index id.

Refer to the official user guide for details.

pub fn collision_objects_interacting_with<'a>(
    &'a self,
    id: InteractionGraphIndex
) -> impl Iterator<Item = CollisionObjectHandle> + 'a
[src]

All the collision object handles of collision objects interacting with the collision object with graph index id.

Refer to the official user guide for details.

pub fn collision_objects_in_contact_with<'a>(
    &'a self,
    id: InteractionGraphIndex
) -> impl Iterator<Item = CollisionObjectHandle> + 'a
[src]

All the collision object handles of collision objects in contact with the collision object with graph index id.

Refer to the official user guide for details.

pub fn collision_objects_in_proximity_of<'a>(
    &'a self,
    id: InteractionGraphIndex
) -> impl Iterator<Item = CollisionObjectHandle> + 'a
[src]

All the collision object handles of collision objects in proximity of with the collision object with graph index id.

Refer to the official user guide for details.

Auto Trait Implementations

impl<N> Send for InteractionGraph<N> where
    N: Scalar

impl<N> Sync for InteractionGraph<N> where
    N: Scalar

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto 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<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 
[src]

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

impl<T> Same for T

type Output = T

Should always be Self