[][src]Module box2d_rs::b2_world_callbacks

Structs

B2contactFilterDefault
B2contactImpulse

Contact impulses for reporting. Impulses are used instead of forces because sub-step forces may approach infinity for rigid body collisions. These match up one-to-one with the contact points in B2manifold.

B2contactListenerDefault

Traits

B2contactFilter

Implement this class to provide collision filtering. In other words, you can implement this class if you want finer control over contact creation.

B2contactListener

Implement this class to get contact information. You can use these results for things like sounds and game logic. You can also get contact results by traversing the contact lists after the time step. However, you might miss some contacts because continuous physics leads to sub-stepping. Additionally you may receive multiple callbacks for the same contact in a single time step. You should strive to make your callbacks efficient because there may be many callbacks per time step. @warning You cannot create/destroy Box2D entities inside these callbacks.

B2destructionListener

Joints and fixtures are destroyed when their associated body is destroyed. Implement this listener so that you may nullify references to these joints and shapes.

B2queryCallback

Called for each fixture found in the query AABB. @return false to terminate the query.

B2rayCastCallback

Called for each fixture found in the query. You control how the ray cast proceeds by returning a f32: return -1: ignore this fixture and continue return 0: terminate the ray cast return fraction: clip the ray to this point return 1: don't clip the ray and continue

Type Definitions

B2contactFilterPtr
B2contactListenerPtr
B2destructionListenerPtr