Skip to main content

Module contact

Module contact 

Source

Modules§

contact_flags

Structs§

Contact
Cold contact data. Used as a persistent handle and for persistent island connectivity. (b2Contact)
ContactEdge
A contact edge is used to connect bodies and contacts together in a contact graph where each body is a node and each contact is an edge. A contact edge belongs to a doubly linked list maintained in each attached body. Each contact has two contact edges, one for each attached body. (b2ContactEdge)
ContactSim
Manages contact between two shapes. A contact exists for each overlapping AABB in the broad-phase (except if filtered), so a contact object may exist that has no contact points. (b2ContactSim)
ContactUpdateContext
The world data update_contact needs, copied out so the caller can hold &mut ContactSim and &Shape borrows at the same time (the C version reads these through b2World*).

Functions§

can_collide
(b2CanCollide)
create_contact
WARNING: this should never fail to create a contact because the pair already exists in the pairSet. (b2CreateContact — C takes shape pointers; the Rust port takes shape ids.)
destroy_contact
A contact is destroyed when:
get_contact_sim
Borrow a contact’s sim data mutably: constraint graph color for awake touching contacts, otherwise the owning solver set. (b2GetContactSim)
update_contact
Update the contact manifold and touching status. Note: do not assume the shape AABBs are overlapping or are valid. (b2UpdateContact)