Struct ncollide2d::world::CollisionWorld[][src]

pub struct CollisionWorld<N: Real, T> { /* fields omitted */ }

A world that handles collision objects.

Methods

impl<N: Real, T> CollisionWorld<N, T>
[src]

Creates a new collision world.

Adds a collision object to the world.

Updates the collision world.

This executes the whole collision detection pipeline:

  1. Clears the event pools.
  2. Executes the broad phase first.
  3. Executes the narrow phase.

Empty the contact and proximity event pools.

Removed the specified set of collision objects from the world.

Panics of any handle is invalid, or if the list contains duplicates.

Sets the position the collision object attached to the specified object.

Adds a filter that tells if a potential collision pair should be ignored or not.

The proximity filter returns false for a given pair of collision objects if they should be ignored by the narrow phase. Keep in mind that modifying the proximity filter will have a non-trivial overhead during the next update as it will force re-detection of all collision pairs.

Removes the pair filter named name.

Executes the broad phase of the collision detection pipeline.

Executes the narrow phase of the collision detection pipeline.

Sets a new narrow phase and returns the previous one.

Keep in mind that modifying the narrow-pase will have a non-trivial overhead during the next update as it will force re-detection of all collision pairs and their associated contacts.

Important traits for ContactPairs<'a, N, T>

Iterates through all the contact pairs detected since the last update.

Important traits for ProximityPairs<'a, N, T>

Iterates through all the proximity pairs detected since the last update.

Important traits for ContactManifolds<'a, N, T>

Iterates through every contact detected since the last update.

Important traits for CollisionObjects<'a, N, T>

Iterates through all collision objects.

Returns a reference to the collision object identified by its handle.

Returns a mutable reference to the collision object identified by its handle.

Sets the collision groups of the given collision object.

Important traits for InterferencesWithRay<'a, 'b, N, T>

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

Important traits for InterferencesWithPoint<'a, 'b, N, T>

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

Important traits for InterferencesWithAABB<'a, 'b, N, T>

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

The contact events pool.

The proximity events pool.

Auto Trait Implementations

impl<N, T> Send for CollisionWorld<N, T> where
    T: Send

impl<N, T> Sync for CollisionWorld<N, T> where
    T: Sync