[−][src]Struct ncollide3d::world::CollisionWorld
A world that handles collision objects.
Methods
impl<N: Real, T> CollisionWorld<N, T>
[src]
pub fn new(margin: N) -> CollisionWorld<N, T>
[src]
Creates a new collision world.
pub fn add(
&mut self,
position: Isometry<N>,
shape: ShapeHandle<N>,
collision_groups: CollisionGroups,
query_type: GeometricQueryType<N>,
data: T
) -> &mut CollisionObject<N, T>
[src]
&mut self,
position: Isometry<N>,
shape: ShapeHandle<N>,
collision_groups: CollisionGroups,
query_type: GeometricQueryType<N>,
data: T
) -> &mut CollisionObject<N, T>
Adds a collision object to the world.
pub fn update(&mut self)
[src]
Updates the collision world.
This executes the whole collision detection pipeline:
- Clears the event pools.
- Executes the broad phase first.
- Executes the narrow phase.
pub fn clear_events(&mut self)
[src]
Empty the contact and proximity event pools.
pub fn remove(&mut self, handles: &[CollisionObjectHandle])
[src]
Removed the specified set of collision objects from the world.
Panics of any handle is invalid, or if the list contains duplicates.
pub fn set_position(&mut self, handle: CollisionObjectHandle, pos: Isometry<N>)
[src]
Sets the position the collision object attached to the specified object.
pub fn set_deformations(&mut self, handle: CollisionObjectHandle, coords: &[N])
[src]
Apply the given deformations to the specified object.
pub fn register_broad_phase_pair_filter<F>(&mut self, name: &str, filter: F) where
F: BroadPhasePairFilter<N, T>,
[src]
F: BroadPhasePairFilter<N, T>,
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.
pub fn unregister_broad_phase_pair_filter(&mut self, name: &str)
[src]
Removes the pair filter named name
.
pub fn perform_broad_phase(&mut self)
[src]
Executes the broad phase of the collision detection pipeline.
pub fn perform_narrow_phase(&mut self)
[src]
Executes the narrow phase of the collision detection pipeline.
ⓘImportant traits for CollisionObjects<'a, N, T>pub fn collision_objects(&self) -> CollisionObjects<N, T>
[src]
Iterates through all collision objects.
pub fn collision_object(
&self,
handle: CollisionObjectHandle
) -> Option<&CollisionObject<N, T>>
[src]
&self,
handle: CollisionObjectHandle
) -> Option<&CollisionObject<N, T>>
Returns a reference to the collision object identified by its handle.
pub fn collision_object_mut(
&mut self,
handle: CollisionObjectHandle
) -> Option<&mut CollisionObject<N, T>>
[src]
&mut self,
handle: CollisionObjectHandle
) -> Option<&mut CollisionObject<N, T>>
Returns a mutable reference to the collision object identified by its handle.
pub fn set_collision_groups(
&mut self,
handle: CollisionObjectHandle,
groups: CollisionGroups
)
[src]
&mut self,
handle: CollisionObjectHandle,
groups: CollisionGroups
)
Sets the collision groups of the given collision object.
ⓘImportant traits for InterferencesWithRay<'a, 'b, N, T>pub fn interferences_with_ray<'a, 'b>(
&'a self,
ray: &'b Ray<N>,
groups: &'b CollisionGroups
) -> InterferencesWithRay<'a, 'b, N, T>
[src]
&'a self,
ray: &'b Ray<N>,
groups: &'b CollisionGroups
) -> 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>pub fn interferences_with_point<'a, 'b>(
&'a self,
point: &'b Point<N>,
groups: &'b CollisionGroups
) -> InterferencesWithPoint<'a, 'b, N, T>
[src]
&'a self,
point: &'b Point<N>,
groups: &'b CollisionGroups
) -> 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>pub fn interferences_with_aabb<'a, 'b>(
&'a self,
aabb: &'b AABB<N>,
groups: &'b CollisionGroups
) -> InterferencesWithAABB<'a, 'b, N, T>
[src]
&'a self,
aabb: &'b AABB<N>,
groups: &'b CollisionGroups
) -> InterferencesWithAABB<'a, 'b, N, T>
Computes the interferences between every rigid bodies of a given broad phase, and a aabb.
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 potential interactions pairs.
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 potential contact pairs.
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 potential proximity pairs.
Refer to the official user guide for details.
pub fn interaction_pair(
&self,
handle1: CollisionObjectHandle,
handle2: CollisionObjectHandle,
effective_only: bool
) -> Option<(CollisionObjectHandle, CollisionObjectHandle, &Interaction<N>)>
[src]
&self,
handle1: CollisionObjectHandle,
handle2: CollisionObjectHandle,
effective_only: bool
) -> Option<(CollisionObjectHandle, CollisionObjectHandle, &Interaction<N>)>
The potential interaction pair between the two specified collision objects.
Refer to the official user guide for details.
pub fn contact_pair(
&self,
handle1: CollisionObjectHandle,
handle2: CollisionObjectHandle,
effective_only: bool
) -> Option<(CollisionObjectHandle, CollisionObjectHandle, &ContactAlgorithm<N>, &ContactManifold<N>)>
[src]
&self,
handle1: CollisionObjectHandle,
handle2: CollisionObjectHandle,
effective_only: bool
) -> Option<(CollisionObjectHandle, CollisionObjectHandle, &ContactAlgorithm<N>, &ContactManifold<N>)>
The potential contact pair between the two specified collision objects.
Refer to the official user guide for details.
pub fn proximity_pair(
&self,
handle1: CollisionObjectHandle,
handle2: CollisionObjectHandle,
effective_only: bool
) -> Option<(CollisionObjectHandle, CollisionObjectHandle, &ProximityAlgorithm<N>)>
[src]
&self,
handle1: CollisionObjectHandle,
handle2: CollisionObjectHandle,
effective_only: bool
) -> Option<(CollisionObjectHandle, CollisionObjectHandle, &ProximityAlgorithm<N>)>
The potential proximity pair between the two specified collision objects.
Refer to the official user guide for details.
pub fn interactions_with(
&self,
handle: CollisionObjectHandle,
effective_only: bool
) -> Option<impl Iterator<Item = (CollisionObjectHandle, CollisionObjectHandle, &Interaction<N>)>>
[src]
&self,
handle: CollisionObjectHandle,
effective_only: bool
) -> Option<impl Iterator<Item = (CollisionObjectHandle, CollisionObjectHandle, &Interaction<N>)>>
All the interaction pairs involving the specified collision object.
Refer to the official user guide for details.
pub fn proximities_with(
&self,
handle: CollisionObjectHandle,
effective_only: bool
) -> Option<impl Iterator<Item = (CollisionObjectHandle, CollisionObjectHandle, &ProximityAlgorithm<N>)>>
[src]
&self,
handle: CollisionObjectHandle,
effective_only: bool
) -> Option<impl Iterator<Item = (CollisionObjectHandle, CollisionObjectHandle, &ProximityAlgorithm<N>)>>
All the proximity pairs involving the specified collision object.
Refer to the official user guide for details.
pub fn contacts_with(
&self,
handle: CollisionObjectHandle,
effective_only: bool
) -> Option<impl Iterator<Item = (CollisionObjectHandle, CollisionObjectHandle, &ContactAlgorithm<N>, &ContactManifold<N>)>>
[src]
&self,
handle: CollisionObjectHandle,
effective_only: bool
) -> Option<impl Iterator<Item = (CollisionObjectHandle, CollisionObjectHandle, &ContactAlgorithm<N>, &ContactManifold<N>)>>
All the contact pairs involving the specified collision object.
Refer to the official user guide for details.
pub fn collision_objects_interacting_with<'a>(
&'a self,
handle: CollisionObjectHandle
) -> Option<impl Iterator<Item = CollisionObjectHandle> + 'a>
[src]
&'a self,
handle: CollisionObjectHandle
) -> Option<impl Iterator<Item = CollisionObjectHandle> + 'a>
All the collision object handles of collision objects interacting with the specified collision object.
Refer to the official user guide for details.
pub fn collision_objects_in_contact_with<'a>(
&'a self,
handle: CollisionObjectHandle
) -> Option<impl Iterator<Item = CollisionObjectHandle> + 'a>
[src]
&'a self,
handle: CollisionObjectHandle
) -> Option<impl Iterator<Item = CollisionObjectHandle> + 'a>
All the collision object handles of collision objects in potential contact with the specified collision object.
Refer to the official user guide for details.
pub fn collision_objects_in_proximity_of<'a>(
&'a self,
handle: CollisionObjectHandle
) -> Option<impl Iterator<Item = CollisionObjectHandle> + 'a>
[src]
&'a self,
handle: CollisionObjectHandle
) -> Option<impl Iterator<Item = CollisionObjectHandle> + 'a>
All the collision object handles of collision objects in potential proximity of with the specified collision object.
Refer to the official user guide for details.
pub fn contact_events(&self) -> &ContactEvents
[src]
The contact events pool.
pub fn proximity_events(&self) -> &ProximityEvents
[src]
The proximity events pool.
Auto Trait Implementations
impl<N, T> Send for CollisionWorld<N, T> where
N: Scalar,
T: Send,
N: Scalar,
T: Send,
impl<N, T> Sync for CollisionWorld<N, T> where
N: Scalar,
T: Sync,
N: Scalar,
T: Sync,
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> 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<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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