[][src]Struct nphysics3d::world::GeometricalWorld

pub struct GeometricalWorld<N: RealField, Handle: BodyHandle, CollHandle: ColliderHandle> { /* fields omitted */ }

The world managing all geometric queries.

This is a wrapper over the CollisionWorld structure from ncollide to simplify its use with the [object::Collider] structure.

Methods

impl<N: RealField, Handle: BodyHandle, CollHandle: ColliderHandle> GeometricalWorld<N, Handle, CollHandle>[src]

pub fn from_parts<BF>(
    broad_phase: BF,
    narrow_phase: NarrowPhase<N, CollHandle>
) -> Self where
    BF: BroadPhase<N, AABB<N>, CollHandle>, 
[src]

Creates a geometrical world from the provided broad-phase and narrow-phase structures.

pub fn new() -> Self[src]

Creates a new collision world.

pub fn maintain<Colliders: ColliderSet<N, Handle, Handle = CollHandle>>(
    &mut self,
    bodies: &mut dyn BodySet<N, Handle = Handle>,
    colliders: &mut Colliders
)
[src]

Maintain the internal structures of the geometrical world by handling body removals and colliders insersion and removals.

pub fn sync_colliders<Colliders: ColliderSet<N, Handle, Handle = CollHandle>>(
    &mut self,
    bodies: &dyn BodySet<N, Handle = Handle>,
    colliders: &mut Colliders
)
[src]

Synchronize all colliders with their body parent and the underlying collision world.

pub fn body_colliders(&self, body: Handle) -> Option<&[CollHandle]>[src]

Returns the set of colliders attached to the specified body.

Returns None if the body has no collider attached to it, of if the body does not exist.

pub fn clear_events(&mut self)[src]

Empty the contact and proximity event pools.

pub fn perform_broad_phase<Colliders>(&mut self, colliders: &Colliders) where
    Colliders: ColliderSet<N, Handle, Handle = CollHandle>, 
[src]

Executes the broad phase of the collision detection pipeline.

pub fn perform_narrow_phase<Colliders>(&mut self, colliders: &Colliders) where
    Colliders: ColliderSet<N, Handle, Handle = CollHandle>, 
[src]

Executes the narrow phase of the collision detection pipeline.

pub fn broad_phase(&self) -> &dyn BroadPhase<N, AABB<N>, CollHandle>[src]

The broad-phase used by this geometrical world.

pub fn interferences_with_ray<'a, 'b, Colliders: ColliderSet<N, Handle, Handle = CollHandle>>(
    &'a self,
    colliders: &'a Colliders,
    ray: &'b Ray<N>,
    max_toi: N,
    groups: &'b CollisionGroups
) -> InterferencesWithRay<'a, 'b, N, Colliders>
[src]

Computes the interferences between every rigid bodies on this world and a ray.

pub fn interferences_with_point<'a, 'b, Colliders: ColliderSet<N, Handle, Handle = CollHandle>>(
    &'a self,
    colliders: &'a Colliders,
    point: &'b Point<N>,
    groups: &'b CollisionGroups
) -> InterferencesWithPoint<'a, 'b, N, Colliders>
[src]

Computes the interferences between every rigid bodies of a given broad phase, and a point.

pub fn interferences_with_aabb<'a, 'b, Colliders: ColliderSet<N, Handle, Handle = CollHandle>>(
    &'a self,
    colliders: &'a Colliders,
    aabb: &'b AABB<N>,
    groups: &'b CollisionGroups
) -> InterferencesWithAABB<'a, 'b, N, Colliders>
[src]

Computes the interferences between every rigid bodies of a given broad phase, and a aabb.

pub fn contact_events(&self) -> &ContactEvents<CollHandle>[src]

The contact events pool.

pub fn proximity_events(&self) -> &ProximityEvents<CollHandle>[src]

The proximity events pool.

pub fn interaction_pairs<'a, Colliders: ColliderSet<N, Handle, Handle = CollHandle>>(
    &'a self,
    colliders: &'a Colliders,
    effective_only: bool
) -> impl Iterator<Item = (CollHandle, &'a Collider<N, Handle>, CollHandle, &'a Collider<N, Handle>, &'a Interaction<N>)>
[src]

All the potential interactions pairs.

Refer to the official user guide for details.

pub fn contact_pairs<'a, Colliders: ColliderSet<N, Handle, Handle = CollHandle>>(
    &'a self,
    colliders: &'a Colliders,
    effective_only: bool
) -> impl Iterator<Item = (CollHandle, &'a Collider<N, Handle>, CollHandle, &'a Collider<N, Handle>, &'a ContactAlgorithm<N>, &'a ContactManifold<N>)>
[src]

All the potential contact pairs.

Refer to the official user guide for details.

pub fn proximity_pairs<'a, Colliders: ColliderSet<N, Handle, Handle = CollHandle>>(
    &'a self,
    colliders: &'a Colliders,
    effective_only: bool
) -> impl Iterator<Item = (CollHandle, &'a Collider<N, Handle>, CollHandle, &'a Collider<N, Handle>, &'a dyn ProximityDetector<N>, Proximity)>
[src]

All the potential proximity pairs.

Refer to the official user guide for details.

pub fn interaction_pair<'a, Colliders: ColliderSet<N, Handle, Handle = CollHandle>>(
    &'a self,
    colliders: &'a Colliders,
    handle1: CollHandle,
    handle2: CollHandle,
    effective_only: bool
) -> Option<(CollHandle, &'a Collider<N, Handle>, CollHandle, &'a Collider<N, Handle>, &'a Interaction<N>)>
[src]

The potential interaction pair between the two specified colliders.

Refer to the official user guide for details.

pub fn contact_pair<'a, Colliders: ColliderSet<N, Handle, Handle = CollHandle>>(
    &'a self,
    colliders: &'a Colliders,
    handle1: CollHandle,
    handle2: CollHandle,
    effective_only: bool
) -> Option<(CollHandle, &'a Collider<N, Handle>, CollHandle, &'a Collider<N, Handle>, &'a ContactAlgorithm<N>, &'a ContactManifold<N>)>
[src]

The potential contact pair between the two specified colliders.

Refer to the official user guide for details.

pub fn proximity_pair<'a, Colliders: ColliderSet<N, Handle, Handle = CollHandle>>(
    &'a self,
    colliders: &'a Colliders,
    handle1: CollHandle,
    handle2: CollHandle,
    effective_only: bool
) -> Option<(CollHandle, &'a Collider<N, Handle>, CollHandle, &'a Collider<N, Handle>, &'a dyn ProximityDetector<N>, Proximity)>
[src]

The potential proximity pair between the two specified colliders.

Refer to the official user guide for details.

pub fn interactions_with<'a, Colliders: ColliderSet<N, Handle, Handle = CollHandle>>(
    &'a self,
    colliders: &'a Colliders,
    handle: CollHandle,
    effective_only: bool
) -> Option<impl Iterator<Item = (CollHandle, &'a Collider<N, Handle>, CollHandle, &'a Collider<N, Handle>, &'a Interaction<N>)>>
[src]

All the interaction pairs involving the specified collider.

Refer to the official user guide for details.

pub fn contacts_with<'a, Colliders: ColliderSet<N, Handle, Handle = CollHandle>>(
    &'a self,
    colliders: &'a Colliders,
    handle: CollHandle,
    effective_only: bool
) -> Option<impl Iterator<Item = (CollHandle, &'a Collider<N, Handle>, CollHandle, &'a Collider<N, Handle>, &'a ContactAlgorithm<N>, &'a ContactManifold<N>)>>
[src]

All the contact pairs involving the specified collider.

Refer to the official user guide for details.

pub fn proximities_with<'a, Colliders: ColliderSet<N, Handle, Handle = CollHandle>>(
    &'a self,
    colliders: &'a Colliders,
    handle: CollHandle,
    effective_only: bool
) -> Option<impl Iterator<Item = (CollHandle, &'a Collider<N, Handle>, CollHandle, &'a Collider<N, Handle>, &'a dyn ProximityDetector<N>, Proximity)>>
[src]

All the proximity pairs involving the specified collider.

Refer to the official user guide for details.

pub fn colliders_interacting_with<'a, Colliders: ColliderSet<N, Handle, Handle = CollHandle>>(
    &'a self,
    colliders: &'a Colliders,
    handle: CollHandle
) -> Option<impl Iterator<Item = (CollHandle, &'a Collider<N, Handle>)>>
[src]

All the collider handles of colliders interacting with the specified collider.

Refer to the official user guide for details.

pub fn colliders_in_contact_with<'a, Colliders: ColliderSet<N, Handle, Handle = CollHandle>>(
    &'a self,
    colliders: &'a Colliders,
    handle: CollHandle
) -> Option<impl Iterator<Item = (CollHandle, &'a Collider<N, Handle>)>>
[src]

All the collider handles of colliders in potential contact with the specified collision object.

Refer to the official user guide for details.

pub fn colliders_in_proximity_of<'a, Colliders: ColliderSet<N, Handle, Handle = CollHandle>>(
    &'a self,
    colliders: &'a Colliders,
    handle: CollHandle
) -> Option<impl Iterator<Item = (CollHandle, &'a Collider<N, Handle>)>>
[src]

All the collider handles of colliders in potential proximity of with the specified collider.

Refer to the official user guide for details.

Auto Trait Implementations

impl<N, Handle, CollHandle> !RefUnwindSafe for GeometricalWorld<N, Handle, CollHandle>

impl<N, Handle, CollHandle> Send for GeometricalWorld<N, Handle, CollHandle> where
    N: Scalar

impl<N, Handle, CollHandle> Sync for GeometricalWorld<N, Handle, CollHandle> where
    N: Scalar

impl<N, Handle, CollHandle> Unpin for GeometricalWorld<N, Handle, CollHandle> where
    CollHandle: Unpin,
    Handle: Unpin,
    N: Scalar + Unpin

impl<N, Handle, CollHandle> !UnwindSafe for GeometricalWorld<N, Handle, CollHandle>

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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>,