Skip to main content

Module sensor

Module sensor 

Source

Structs§

Sensor
Sensors are shapes that live in the broad-phase but never have contacts. At the end of the time step all sensors are queried for overlap with any other shapes. Sensors ignore body type and sleeping. Sensors generate events when a new overlap appears or an overlap disappears. (b2Sensor)
SensorHit
Used to track shapes that hit sensors using time of impact. (b2SensorHit)
SensorOverlaps
(b2SensorOverlaps, from shape.h)
SensorTaskContext
(b2SensorTaskContext)
Visitor
(b2Visitor)

Functions§

destroy_sensor
Destroy the sensor record for a sensor shape, emitting end-touch events for its active overlaps. (b2DestroySensor — C takes the shape pointer; the Rust port takes the shape id.)
overlap_sensors
Update sensor overlaps and publish begin/end touch events. (b2SensorTask + b2OverlapSensors — serial: one worker, one range)