Struct rin::scene::physics::Collisions [−][src]
pub struct Collisions<Group, UserData = Entity> where
Group: Into<usize>, { pub world: CollisionWorld<f32, UserData>, pub contacts_query: GeometricQueryType<f32>, // some fields omitted }
Fields
world: CollisionWorld<f32, UserData>
contacts_query: GeometricQueryType<f32>
Implementations
impl<Group, UserData> Collisions<Group, UserData> where
Group: Into<usize> + Copy,
[src]
impl<Group, UserData> Collisions<Group, UserData> where
Group: Into<usize> + Copy,
[src]pub fn new() -> Collisions<Group, UserData>
[src]
pub fn add(
&mut self,
group: Group,
whitelist: &[Group],
blacklist: &[Group],
data: UserData,
shape: ShapeHandle<f32>,
iso: Isometry<f32, U3, Unit<Quaternion<f32>>>
) -> (CollisionObjectSlabHandle, &mut CollisionObject<f32, UserData>)
[src]
&mut self,
group: Group,
whitelist: &[Group],
blacklist: &[Group],
data: UserData,
shape: ShapeHandle<f32>,
iso: Isometry<f32, U3, Unit<Quaternion<f32>>>
) -> (CollisionObjectSlabHandle, &mut CollisionObject<f32, UserData>)
pub fn remove(&mut self, handles: &[CollisionObjectSlabHandle])
[src]
pub fn update(&mut self)
[src]
pub fn contacts(
&self
) -> impl Iterator<Item = (CollisionObjectSlabHandle, CollisionObjectSlabHandle, &Box<dyn ContactManifoldGenerator<f32> + 'static, Global>, &ContactManifold<f32>)>
[src]
&self
) -> impl Iterator<Item = (CollisionObjectSlabHandle, CollisionObjectSlabHandle, &Box<dyn ContactManifoldGenerator<f32> + 'static, Global>, &ContactManifold<f32>)>
pub fn set_position(
&mut self,
handle: CollisionObjectSlabHandle,
iso: Isometry<f32, U3, Unit<Quaternion<f32>>>
)
[src]
&mut self,
handle: CollisionObjectSlabHandle,
iso: Isometry<f32, U3, Unit<Quaternion<f32>>>
)
pub fn objects(&self) -> CollisionObjects<'_, f32, UserData>
[src]
pub fn object(
&self,
handle: CollisionObjectSlabHandle
) -> Option<&CollisionObject<f32, UserData>>
[src]
&self,
handle: CollisionObjectSlabHandle
) -> Option<&CollisionObject<f32, UserData>>
pub fn object_mut(
&mut self,
handle: CollisionObjectSlabHandle
) -> Option<&mut CollisionObject<f32, UserData>>
[src]
&mut self,
handle: CollisionObjectSlabHandle
) -> Option<&mut CollisionObject<f32, UserData>>
pub fn ray_intersection(
&self,
ray_group: Group,
whitelist: &[Group],
blacklist: &[Group],
ray: &Ray<f32>,
max_toi: f32
) -> Option<(CollisionObjectSlabHandle, &CollisionObject<f32, UserData>, RayIntersection<f32>)>
[src]
&self,
ray_group: Group,
whitelist: &[Group],
blacklist: &[Group],
ray: &Ray<f32>,
max_toi: f32
) -> Option<(CollisionObjectSlabHandle, &CollisionObject<f32, UserData>, RayIntersection<f32>)>
pub fn ray_intersections(
&self,
ray_group: Group,
whitelist: &[Group],
blacklist: &[Group],
ray: &Ray<f32>,
max_toi: f32
) -> impl Iterator<Item = (CollisionObjectSlabHandle, &CollisionObject<f32, UserData>, RayIntersection<f32>)>
[src]
&self,
ray_group: Group,
whitelist: &[Group],
blacklist: &[Group],
ray: &Ray<f32>,
max_toi: f32
) -> impl Iterator<Item = (CollisionObjectSlabHandle, &CollisionObject<f32, UserData>, RayIntersection<f32>)>
impl<Group, UserData> Collisions<Group, UserData> where
Group: Into<usize> + Copy + MouseGroup,
[src]
impl<Group, UserData> Collisions<Group, UserData> where
Group: Into<usize> + Copy + MouseGroup,
[src]pub fn mouse_select(
&self,
whitelist: &[Group],
blacklist: &[Group],
mouse: &Point<f32, U2>,
max_toi: f32,
viewport: &Rect<i32>,
camera: &dyn CameraExt
) -> Option<&UserData>
[src]
&self,
whitelist: &[Group],
blacklist: &[Group],
mouse: &Point<f32, U2>,
max_toi: f32,
viewport: &Rect<i32>,
camera: &dyn CameraExt
) -> Option<&UserData>
pub fn mouse_select_all(
&self,
whitelist: &[Group],
blacklist: &[Group],
mouse: &Point<f32, U2>,
max_toi: f32,
viewport: &Rect<i32>,
camera: &dyn CameraExt
) -> impl Iterator<Item = &UserData>
[src]
&self,
whitelist: &[Group],
blacklist: &[Group],
mouse: &Point<f32, U2>,
max_toi: f32,
viewport: &Rect<i32>,
camera: &dyn CameraExt
) -> impl Iterator<Item = &UserData>
pub fn mouse_intersections(
&self,
whitelist: &[Group],
blacklist: &[Group],
mouse: &Point<f32, U2>,
max_toi: f32,
viewport: &Rect<i32>,
camera: &dyn CameraExt
) -> impl Iterator<Item = (Ray<f32>, CollisionObjectSlabHandle, &CollisionObject<f32, UserData>, RayIntersection<f32>)>
[src]
&self,
whitelist: &[Group],
blacklist: &[Group],
mouse: &Point<f32, U2>,
max_toi: f32,
viewport: &Rect<i32>,
camera: &dyn CameraExt
) -> impl Iterator<Item = (Ray<f32>, CollisionObjectSlabHandle, &CollisionObject<f32, UserData>, RayIntersection<f32>)>
pub fn mouse_intersection(
&self,
whitelist: &[Group],
blacklist: &[Group],
mouse: &Point<f32, U2>,
max_toi: f32,
viewport: &Rect<i32>,
camera: &dyn CameraExt
) -> Option<(Ray<f32>, CollisionObjectSlabHandle, &CollisionObject<f32, UserData>, RayIntersection<f32>)>
[src]
&self,
whitelist: &[Group],
blacklist: &[Group],
mouse: &Point<f32, U2>,
max_toi: f32,
viewport: &Rect<i32>,
camera: &dyn CameraExt
) -> Option<(Ray<f32>, CollisionObjectSlabHandle, &CollisionObject<f32, UserData>, RayIntersection<f32>)>
impl<Group, UserData> Collisions<Group, UserData> where
Group: Into<usize> + Copy,
UserData: From<Entity>,
[src]
impl<Group, UserData> Collisions<Group, UserData> where
Group: Into<usize> + Copy,
UserData: From<Entity>,
[src]pub fn add_entity<'a, C>(
&mut self,
group: Group,
whitelist: &[Group],
blacklist: &[Group],
world: &mut C,
entity: Entity,
shape: ShapeHandle<f32>,
iso: Isometry<f32, U3, Unit<Quaternion<f32>>>
) -> CollisionObjectSlabHandle where
C: EntitiesCreationExt<'a>,
[src]
&mut self,
group: Group,
whitelist: &[Group],
blacklist: &[Group],
world: &mut C,
entity: Entity,
shape: ShapeHandle<f32>,
iso: Isometry<f32, U3, Unit<Quaternion<f32>>>
) -> CollisionObjectSlabHandle where
C: EntitiesCreationExt<'a>,
pub fn remove_entity<'a, C>(&mut self, entity: &Entity, entities: &C) where
C: EntitiesExt<'a>,
[src]
C: EntitiesExt<'a>,
pub fn change_shape<'a, E, I>(
&mut self,
entity: &Entity,
shape: ShapeHandle<f32>,
iso: I,
entities: &E
) -> Result<(), Error> where
E: EntitiesExt<'a>,
I: Into<Option<Isometry<f32, U3, Unit<Quaternion<f32>>>>>,
[src]
&mut self,
entity: &Entity,
shape: ShapeHandle<f32>,
iso: I,
entities: &E
) -> Result<(), Error> where
E: EntitiesExt<'a>,
I: Into<Option<Isometry<f32, U3, Unit<Quaternion<f32>>>>>,
pub fn update_dynamic_entities<'a, E>(&mut self, entities: &E) where
E: EntitiesExt<'a>,
[src]
E: EntitiesExt<'a>,
pub fn update_all_entities<'a, E>(&mut self, entities: &E) where
E: EntitiesExt<'a>,
[src]
E: EntitiesExt<'a>,
Trait Implementations
Auto Trait Implementations
impl<Group, UserData = Entity> !RefUnwindSafe for Collisions<Group, UserData>
impl<Group, UserData> Send for Collisions<Group, UserData> where
Group: Send,
UserData: Send,
Group: Send,
UserData: Send,
impl<Group, UserData> Sync for Collisions<Group, UserData> where
Group: Sync,
UserData: Sync,
Group: Sync,
UserData: Sync,
impl<Group, UserData> Unpin for Collisions<Group, UserData> where
Group: Unpin,
UserData: Unpin,
Group: Unpin,
UserData: Unpin,
impl<Group, UserData = Entity> !UnwindSafe for Collisions<Group, UserData>
Blanket Implementations
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]