Skip to main content

Module world

Module world 

Source

Structs§

Profile
Profiling data. Times are in milliseconds. (b2Profile)
TaskContext
Per thread task storage. (b2TaskContext)
World
The world struct manages all physics entities, dynamic simulation, and asynchronous queries. (b2World)

Functions§

default_friction_callback
Default friction mixing: sqrt(frictionA * frictionB). (static b2DefaultFrictionCallback)
default_restitution_callback
Default restitution mixing: max(restitutionA, restitutionB). (static b2DefaultRestitutionCallback)
world_step
Simulate a world for one time step. (b2World_Step — takes &mut World; the C resolves the world from an id)

Type Aliases§

CustomFilterFcn
Prototype for a contact filter callback. Called when a contact pair is considered for collision, if one of the two shapes has custom filtering enabled. Return false to disable the collision. (b2CustomFilterFcn)
PreSolveFcn
Prototype for a pre-solve callback. Called after a contact is updated, only for awake dynamic bodies with pre-solve events enabled. Return false to disable the contact this step. (b2PreSolveFcn)