Rapier C — 2D / f32 0.36.0+c.0
Loading...
Searching...
No Matches
R2EventCallbacks Struct Reference

Callbacks invoked while stepping, in addition to collecting the events. More...

#include <rapier.h>

Data Fields

void * user_data
 Application data; Rapier does not own pointers encoded in it.
R2CollisionEventCallback collision_event
 Optional collision start/stop callback.
R2ContactForceEventCallback contact_force_event
 Optional contact-force callback.

Detailed Description

Callbacks invoked while stepping, in addition to collecting the events.

They follow the R2PhysicsHooks rules: never unwind or retain arguments, read through the ReadContext, never mutate the world, and be safe for concurrent invocation in parallel builds. NULL callbacks are skipped.

Field Documentation

◆ collision_event

R2CollisionEventCallback R2EventCallbacks::collision_event

Optional collision start/stop callback.

◆ contact_force_event

R2ContactForceEventCallback R2EventCallbacks::contact_force_event

Optional contact-force callback.

◆ user_data

void* R2EventCallbacks::user_data

Application data; Rapier does not own pointers encoded in it.


The documentation for this struct was generated from the following file: