Expand description
A ConstraintGraph with graph coloring for solving constraints in parallel.
The constraint graph implements a greedy edge coloring algorithm that assigns constraints to colors such that no adjacent edges in the graph share the same color. This ensures that each body only appears in a given color once, allowing constraints within the same color to be solved in parallel without race conditions.
See ConstraintGraph for more details on how the graph is structured.
§References
Structs§
- Constraint
Graph  - The constraint graph used for graph coloring to solve constraints in parallel.
 - Contact
Constraint Handle  - A handle to a contact constraint in the 
ConstraintGraph. - Contact
Manifold Handle  - A handle to a contact manifold in the 
ContactGraph. - Graph
Color  - A color in the 
ConstraintGraph. Each color is a set of bodies and constraints that can be solved in parallel without race conditions. 
Constants§
- COLOR_
OVERFLOW_ INDEX  - The index of the overflow color in the graph, used for constraints that don’t fit the graph color limit. This can happen when a single body is interacting with many other bodies.
 - DYNAMIC_
COLOR_ COUNT  - The number of colors with constraints involving two non-static bodies. Leaving constraints involving static bodies to later colors gives higher priority to those constraints, reducing tunneling through static geometry.
 - GRAPH_
COLOR_ COUNT  - The maximum number of 
GraphColors in theConstraintGraph. Constraints that cannot find a color are added to the overflow set, which is solved on a single thread.