pub trait PhysicsSensor {
// Required methods
fn is_triggered(&self) -> bool;
fn overlapping_bodies(&self) -> Vec<u64>;
fn update(&mut self, body_positions: &[(u64, [Real; 3])]);
}Expand description
Trait for physics sensors (trigger volumes, proximity detectors, etc.).
Required Methods§
Sourcefn is_triggered(&self) -> bool
fn is_triggered(&self) -> bool
Return true if the sensor is currently triggered by any body.
Sourcefn overlapping_bodies(&self) -> Vec<u64>
fn overlapping_bodies(&self) -> Vec<u64>
Return the IDs of all bodies currently overlapping this sensor.