Skip to main content

Module constraint_graph

Module constraint_graph 

Source

Structs§

ConstraintGraph
(b2ConstraintGraph)
GraphColor
(b2GraphColor)

Constants§

DYNAMIC_COLOR_COUNT
This keeps constraints involving two dynamic bodies at a lower solver priority than constraints involving a dynamic and static bodies. This reduces tunneling due to push through. (B2_DYNAMIC_COLOR_COUNT)
OVERFLOW_INDEX
This holds constraints that cannot fit the graph color limit. This happens when a single dynamic body is touching many other bodies. (B2_OVERFLOW_INDEX)

Functions§

add_contact_to_graph
Contacts are always created as non-touching. They get moved into the constraint graph once they are found to be touching. (b2AddContactToGraph)
add_joint_to_graph
(b2AddJointToGraph)
create_joint_in_graph
Assign a color and slot in the graph for a joint. Returns (color_index, local_index) rather than the C interior pointer. (b2CreateJointInGraph)
get_graph_color
Get the visualization color assigned to a constraint graph color slot. (b2GetGraphColor)
remove_contact_from_graph
(b2RemoveContactFromGraph)
remove_joint_from_graph
(b2RemoveJointFromGraph)