pub struct SuperpositionObserver {
pub position: [f32; 3],
pub active_radius: f32,
pub active_radius_sq: f32,
pub decohere_radius: f32,
pub decohere_radius_sq: f32,
pub decohere_tick_rate: u32,
pub tick_index: u32,
}Expand description
Observer position and decoherence ring radii.
Three concentric rings around the observer: [0, active_radius] → Active (full simulation) [active_radius, decohere_radius] → Decohering (reduced-rate simulation) [decohere_radius, ∞) → Superposed (no simulation)
The decoherence ring prevents visual pop-in: bodies warm up for a few ticks before becoming fully Active, and cool down before going Superposed.
Fields§
§position: [f32; 3]§active_radius: f32Inner radius: full Active simulation.
active_radius_sq: f32§decohere_radius: f32Outer radius: Decohering transition zone beyond active_radius.
decohere_radius_sq: f32§decohere_tick_rate: u32How often Decohering bodies simulate (every Nth tick). Default: 2.
tick_index: u32Current tick index (for modulo check on Decohering bodies).
Implementations§
Source§impl SuperpositionObserver
impl SuperpositionObserver
Sourcepub fn new(position: [f32; 3], active_radius: f32) -> Self
pub fn new(position: [f32; 3], active_radius: f32) -> Self
Create with default decoherence ring (1.5× active radius, simulate every 2nd tick).
Sourcepub fn with_rings(
position: [f32; 3],
active_radius: f32,
decohere_radius: f32,
tick_rate: u32,
) -> Self
pub fn with_rings( position: [f32; 3], active_radius: f32, decohere_radius: f32, tick_rate: u32, ) -> Self
Create with explicit decoherence ring.
Sourcepub fn advance_tick(&mut self)
pub fn advance_tick(&mut self)
Advance tick index (call once per step).
Sourcepub fn should_decohere_simulate(&self) -> bool
pub fn should_decohere_simulate(&self) -> bool
Should a Decohering body simulate this tick?
Sourcepub fn classify(&self, body_pos: &[f32; 3]) -> SuperpositionState
pub fn classify(&self, body_pos: &[f32; 3]) -> SuperpositionState
Classify a position into a superposition ring.
Trait Implementations§
Source§impl Clone for SuperpositionObserver
impl Clone for SuperpositionObserver
Source§fn clone(&self) -> SuperpositionObserver
fn clone(&self) -> SuperpositionObserver
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more