Physics world.
typedef struct World { uint sig; void *wobj; } World;

Query result.
typedef struct WorldQueryResult

Object reference.
void *ref;

Normal vector where ray intersected body in world space.
S3f norm;

Point where ray intersected body in world space.
S3f pos;

End block 'World query result'
} WorldQueryResult;

Return all bodies that intersect with the given AABB.Results must be destroyed with WorldDestroyQueryResults().
API uint WorldAABBQuery(World world, BArray *results, B3f aabb);
world: World.
results: Result array.
aabb: AABB used for intesection test.
returns: Result count.

Return first body that intersects with ray.Results must be destroyed with WorldDestroyQueryResults().
API uint WorldRayQuery(World world, BArray *results, S3f a, S3f b, bool all);
world: World.
results: Pointer to results pointer.
a: First line endpoint.
b: Second line endpoint.
all: True to return all intersections. False to return first intersection.
returns: Result count.

Set gravity vector. Earth gravity is S3f(0, -9.8f, 0);
API void WorldSetGravity(World world, S3f gravity);
world: World.
gravity: Gravity vector.

Set whether inactive bodies should sleep to save simulation processing.
API void WorldSetSleep(World world, bool enable);
world: World.
enable: True for inactive bodies to sleep.

Set constraint solver iterations.
API void WorldSetIter(World world, uint vel, uint pos);
world: World.
vel: Velocity iterations.
pos: Position iterations.

Create world.
API World WorldCreate();
returns: World.

Destroy world.
API void WorldDestroy(World *world);
world: World.