Skip to main content

Module solver_set

Module solver_set 

Source

Structs§

SolverSet
This holds solver set data. The following sets are used:

Constants§

AWAKE_SET
Awake set for awake bodies and awake non-touching contacts. Awake touching contacts and awake joints live in the constraint graph.
DISABLED_SET
Disabled set for disabled bodies and their joints.
FIRST_SLEEPING_SET
The index of the first sleeping set. Each island that goes to sleep is put into a sleeping set holding all bodies, contacts, and joints from that island, making it very efficient to wake a single island.
STATIC_SET
Static set for static bodies and joints between static bodies.

Functions§

destroy_solver_set
(b2DestroySolverSet)
merge_solver_sets
This is called when joints are created between sets. I want to allow the sets to continue sleeping if both are asleep. Otherwise one set is waked. Islands will get merged when the set is waked. (b2MergeSolverSets)
transfer_body
Move a body between solver sets. (b2TransferBody — C passes set pointers; the Rust port passes set indices.)
transfer_joint
Move a joint between solver sets. (b2TransferJoint — C passes set pointers; the Rust port passes set indices.)
try_sleep_island
Islands need to have a deterministic order because data is moved to a sleeping set according to island order. (b2TrySleepIsland)
wake_solver_set
Wake a solver set. Does not merge islands. Contacts can be in several places: