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

Callbacks must not unwind or retain arguments. More...

#include <rapier.h>

Data Fields

void * user_data
 Application data; Rapier does not own pointers encoded in it.
R2PairFilter filter_contact_pair
 Optional contact-pair filter, called only for colliders enabling the hook.
R2PairFilter filter_intersection_pair
 Optional sensor-pair filter, called only for colliders enabling the hook.
R2ModifyContacts modify_solver_contacts
 Optional legacy aggregate contact-edit callback.
R2ModifyContactContext modify_solver_contacts_context
 Runs after the legacy property callback.

Detailed Description

Callbacks must not unwind or retain arguments.

Use their ReadContext to inspect bodies and colliders; ordinary access to the stepping world returns WORLD_BUSY. Mutations must be performed after stepping. With parallel builds callbacks and their user_data must be safe for concurrent invocation. NULL callbacks use defaults.

Field Documentation

◆ filter_contact_pair

R2PairFilter R2PhysicsHooks::filter_contact_pair

Optional contact-pair filter, called only for colliders enabling the hook.

◆ filter_intersection_pair

R2PairFilter R2PhysicsHooks::filter_intersection_pair

Optional sensor-pair filter, called only for colliders enabling the hook.

◆ modify_solver_contacts

R2ModifyContacts R2PhysicsHooks::modify_solver_contacts

Optional legacy aggregate contact-edit callback.

◆ modify_solver_contacts_context

R2ModifyContactContext R2PhysicsHooks::modify_solver_contacts_context

Runs after the legacy property callback.

Context accessors may be called here.

◆ user_data

void* R2PhysicsHooks::user_data

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


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