pub struct Contact {
pub edges: [ContactEdge; 2],
pub island_id: i32,
pub island_index: i32,
pub set_index: i32,
pub color_index: i32,
pub local_index: i32,
pub shape_id_a: i32,
pub shape_id_b: i32,
pub contact_id: i32,
pub flags: u32,
pub generation: u32,
}Expand description
Cold contact data. Used as a persistent handle and for persistent island connectivity. (b2Contact)
Fields§
§edges: [ContactEdge; 2]§island_id: i32A contact only belongs to an island if touching, otherwise NULL_INDEX.
island_index: i32Index into the island’s contacts array for O(1) swap-removal. NULL_INDEX when not in an island.
set_index: i32index of simulation set stored in World. NULL_INDEX when slot is free.
color_index: i32index into the constraint graph color array. NULL_INDEX for non-touching or sleeping contacts, and when the slot is free.
local_index: i32contact index within set or graph color. NULL_INDEX when slot is free.
shape_id_a: i32§shape_id_b: i32§contact_id: i32§flags: u32contact_flags bits
generation: u32Monotonically advanced when a contact is allocated in this slot. Used to check for invalid ContactId.
Trait Implementations§
impl Copy for Contact
impl Eq for Contact
impl StructuralPartialEq for Contact
Auto Trait Implementations§
impl Freeze for Contact
impl RefUnwindSafe for Contact
impl Send for Contact
impl Sync for Contact
impl Unpin for Contact
impl UnsafeUnpin for Contact
impl UnwindSafe for Contact
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