[−][src]Struct ncollide2d::narrow_phase::InteractionGraph
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]
&self
) -> &UnGraph<CollisionObjectHandle, Interaction<N>, usize>
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]
&mut self,
id: InteractionGraphIndex
) -> Option<CollisionObjectHandle>
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]
&self,
effective_only: bool
) -> impl Iterator<Item = (CollisionObjectHandle, CollisionObjectHandle, &Interaction<N>)>
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]
&self,
effective_only: bool
) -> impl Iterator<Item = (CollisionObjectHandle, CollisionObjectHandle, &ContactAlgorithm<N>, &ContactManifold<N>)>
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]
&self,
effective_only: bool
) -> impl Iterator<Item = (CollisionObjectHandle, CollisionObjectHandle, &ProximityAlgorithm<N>)>
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]
&self,
id1: InteractionGraphIndex,
id2: InteractionGraphIndex,
effective_only: bool
) -> Option<(CollisionObjectHandle, CollisionObjectHandle, &Interaction<N>)>
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]
&self,
id1: InteractionGraphIndex,
id2: InteractionGraphIndex,
effective_only: bool
) -> Option<(CollisionObjectHandle, CollisionObjectHandle, &ContactAlgorithm<N>, &ContactManifold<N>)>
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]
&self,
id1: InteractionGraphIndex,
id2: InteractionGraphIndex,
effective_only: bool
) -> Option<(CollisionObjectHandle, CollisionObjectHandle, &ProximityAlgorithm<N>)>
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]
&self,
id: InteractionGraphIndex,
effective_only: bool
) -> impl Iterator<Item = (CollisionObjectHandle, CollisionObjectHandle, &Interaction<N>)>
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]
&self,
handle: InteractionGraphIndex,
effective_only: bool
) -> impl Iterator<Item = (CollisionObjectHandle, CollisionObjectHandle, &ProximityAlgorithm<N>)>
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]
&self,
handle: InteractionGraphIndex,
effective_only: bool
) -> impl Iterator<Item = (CollisionObjectHandle, CollisionObjectHandle, &ContactAlgorithm<N>, &ContactManifold<N>)>
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]
&'a self,
id: InteractionGraphIndex
) -> impl Iterator<Item = CollisionObjectHandle> + 'a
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]
&'a self,
id: InteractionGraphIndex
) -> impl Iterator<Item = CollisionObjectHandle> + 'a
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]
&'a self,
id: InteractionGraphIndex
) -> impl Iterator<Item = CollisionObjectHandle> + 'a
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,
N: Scalar,
impl<N> Sync for InteractionGraph<N> where
N: Scalar,
N: Scalar,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<SS, SP> SupersetOf for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
[src]
fn is_in_subset(&self) -> bool
[src]
unsafe fn to_subset_unchecked(&self) -> SS
[src]
fn from_subset(element: &SS) -> SP
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> Same for T
type Output = T
Should always be Self