pub struct Contact {Show 23 fields
pub set_index: i32,
pub color_index: i32,
pub local_index: i32,
pub edges: [ContactEdge; 2],
pub shape_id_a: i32,
pub shape_id_b: i32,
pub child_index: i32,
pub island_id: i32,
pub island_index: i32,
pub contact_id: i32,
pub body_sim_index_a: i32,
pub body_sim_index_b: i32,
pub flags: u32,
pub manifolds: Vec<Manifold>,
pub cached_rotation_a: Quat,
pub cached_rotation_b: Quat,
pub cached_relative_pose: Transform,
pub friction: f32,
pub restitution: f32,
pub rolling_resistance: f32,
pub tangent_velocity: Vec3,
pub geometry: ContactGeometry,
pub generation: u32,
}Expand description
Persistent interaction between two shapes. (b3Contact)
Fields§
§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.
edges: [ContactEdge; 2]§shape_id_a: i32§shape_id_b: i32§child_index: i32§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.
contact_id: i32Back index into World::contacts
body_sim_index_a: i32Transient and cached for performance. NULL_INDEX for static bodies.
body_sim_index_b: i32§flags: u32contact_flags bits
manifolds: Vec<Manifold>§cached_rotation_a: QuatCache for contact recycling.
cached_rotation_b: Quat§cached_relative_pose: Transform§friction: f32Mixed friction and restitution
restitution: f32§rolling_resistance: f32§tangent_velocity: Vec3§geometry: ContactGeometryUsage determined by SIM_MESH_CONTACT in flags
generation: u32Monotonically advanced when a contact is allocated in this slot. Used to check for invalid ContactId.