Skip to main content

Module island

Module island 

Source

Structs§

ContactLink
Cached contact data stored in the island for fast contiguous iteration. Avoids touching Contact during union-find in island splitting. (b2ContactLink)
Island
Persistent island for awake bodies, joints, and contacts. Contacts are touching. Contacts and joints may connect to static bodies, but static bodies are not in the island. (b2Island)
IslandSim
Used to move islands across solver sets. (b2IslandSim)
JointLink
Cached joint data stored in the island for fast contiguous iteration. (b2JointLink)

Functions§

create_island
Create an empty island in the given set. Returns the island id. (b2CreateIsland — C returns a pointer; Rust returns the id)
destroy_island
(b2DestroyIsland)
link_contact
Link a contact into an island when it starts having contact points. (b2LinkContact)
link_joint
Link a joint into the island graph when it is created. (b2LinkJoint)
split_island
Split an island because some contacts and/or joints have been removed. This uses union-find and touches a lot of memory, so it can be slow. Note: contacts/joints connected to static bodies must belong to an island but don’t affect island connectivity. Note: static bodies are never in an island. (b2SplitIsland / b2SplitIslandTask — the C runs this as a task in parallel with the constraint solve; the serial port calls it inline)
unlink_contact
Unlink a contact from the island graph when it stops having contact points or is destroyed. (b2UnlinkContact)
unlink_joint
Unlink a joint from the island graph when it is destroyed. (b2UnlinkJoint)
validate_island
Validate island connectivity and bookkeeping. (b2ValidateIsland)