pub struct CollisionGraph {
pub src: UnGraph<ColliderHandle, Option<Interaction>, usize>,
pub binding: FxHashMap<ColliderHandle, NodeIndex<usize>>,
}
Expand description
Structure for storing informations about the active collisions.
Currently unaware of anything besides the handles that collide or whether the collision started this frame.
Stores result of broadphase that narrowphase should use.
Fields§
§src: UnGraph<ColliderHandle, Option<Interaction>, usize>
§binding: FxHashMap<ColliderHandle, NodeIndex<usize>>
Implementations§
Source§impl CollisionGraph
impl CollisionGraph
pub fn with_capacity(nodes: usize, edges: usize) -> Self
pub fn add_node(&mut self, handle: ColliderHandle)
pub fn get_node_index(&self, handle: ColliderHandle) -> NodeIndex<usize>
pub fn update_edge(&mut self, handle1: ColliderHandle, handle2: ColliderHandle)
pub fn remove_node(&mut self, handle: ColliderHandle)
pub fn edges( &self, handle: ColliderHandle, ) -> impl Iterator<Item = (ColliderHandle, &Interaction)>
Auto Trait Implementations§
impl Freeze for CollisionGraph
impl RefUnwindSafe for CollisionGraph
impl Send for CollisionGraph
impl Sync for CollisionGraph
impl Unpin for CollisionGraph
impl UnwindSafe for CollisionGraph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more