Cast a capsule mover through the world. This is a special shape cast that
handles sliding along other shapes while reducing clipping. Returns the
fraction of the translation that can be performed without a hit.
(b2World_CastMover + static MoverCastCallback)
Cast a ray into the world to collect shapes in the path of the ray. The
callback receives (shape_id, point, normal, fraction) and controls the
continuation like C’s b2CastResultFcn: return -1 to ignore the hit, 0 to
terminate, a fraction to clip the ray, or 1 to continue without clipping.
(b2World_CastRay + static RayCastCallback)
Cast a ray into the world to collect the closest hit. This is a
convenience function. Ignores initial overlap.
(b2World_CastRayClosest + static b2RayCastClosestFcn)
Cast a shape through the world. Similar to a cast ray except that a shape
is cast instead of a point. The callback contract matches
world_cast_ray. (b2World_CastShape + static ShapeCastCallback)
Collide a capsule mover with the world, gathering collision planes that
can be fed to solve_planes. Useful for character controllers. The
callback returns false to terminate the query.
(b2World_CollideMover + static TreeCollideCallback)
Enable/disable continuous collision between dynamic and static bodies.
Generally you should keep continuous collision enabled to prevent fast
moving objects from going through static objects. The performance gain
from disabling continuous collision is minor. (b2World_EnableContinuous)
Enable/disable sleep. If your application does not need sleeping, you can
gain some performance by disabling sleep completely at the world level.
(b2World_EnableSleeping)
Overlap test for all shapes that potentially overlap the provided AABB.
The callback receives each overlapping shape id and returns false to
terminate the query. (b2World_OverlapAABB + static TreeQueryCallback)
Overlap test for all shapes that overlap the provided shape proxy. The
callback returns false to terminate the query.
(b2World_OverlapShape + static TreeOverlapCallback)
Set the contact recycle distance. Contacts this close to a recently
destroyed contact reuse the old impulses for warm starting.
(b2World_SetContactRecycleDistance)
Set the gravity vector for the entire world. Box2D has no concept of an up
direction and this is left as a decision for the application.
(b2World_SetGravity)
Adjust the hit event threshold. This controls the collision speed needed
to generate a b2ContactHitEvent. Usually in meters per second.
(b2World_SetHitEventThreshold)
Adjust the restitution threshold. It is recommended not to make this value
very small because it will prevent bodies from sleeping. Usually in meters
per second. (b2World_SetRestitutionThreshold)
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)
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)