physics2d

Defines physics engine for 2d games.

Functions

check_collision2d

Check for a collision between 2 bounding boxes.

clamp_window_bounds2d

Checks for the bounding box leaving the window and halts it.

dist_to_pixels

Convert real units to pixel units.

pixels_to_dist

Convert pixel units to real units.

resolve_collision2d

Resolve a collision between 2 bounding boxes by moving one.

Classes

Collision2dParams

Parameters of an axis aligned bounding box for 2d objects.

Physics2dParams

Parameters for the 2d physics system to be parsed by the config parser.