pub struct CollisionWorld<N: Real, T> { /* private fields */ }
Expand description

A world that handles collision objects.

Implementations§

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.

The contact pair, if any, between the given collision objects.

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

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

Iterates through every contact detected since the last update.

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.

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

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

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§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Checks if self is actually part of its subset T (and can be converted to it).
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
The inclusion map: converts self to the equivalent element of its superset.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.