pub struct DecoherenceField {
pub position: [f32; 3],
pub radius: f32,
pub target_form: WaveForm,
pub gamma: f32,
pub animation_clip: String,
pub source_tag: String,
}Expand description
A spatial decoherence field attached to a Zone or POI. When the observer enters the field radius, the wave form begins collapsing into the target form at rate gamma.
Mathematical model: Lindblad decoherence kernel coherence(t) = exp(-gamma * t_in_field) target_weight = 1.0 - coherence(t)
The field strength falls off spatially: effective_gamma = gamma * max(0, 1 - dist/radius)
Fields§
§position: [f32; 3]Center position of the field in world space.
radius: f32Field radius — decoherence begins when observer enters this radius.
target_form: WaveFormTarget wave form after full collapse.
gamma: f32Decoherence rate Gamma (per second). Higher = faster collapse. Typical: 2.0 (gentle, ~1s), 8.0 (fast, ~0.25s), 20.0 (instant snap).
animation_clip: StringAnimation clip name for the target form (e.g., “climb_stairs”). Empty string = use zone default idle.
source_tag: StringPropertyTag that triggered this field (for debugging/attestation).
Implementations§
Source§impl DecoherenceField
impl DecoherenceField
Sourcepub fn effective_gamma(&self, observer_pos: &[f32; 3]) -> f32
pub fn effective_gamma(&self, observer_pos: &[f32; 3]) -> f32
Compute effective decoherence rate at a given distance from field center. Returns 0.0 if outside radius (no decoherence).
Trait Implementations§
Source§impl Clone for DecoherenceField
impl Clone for DecoherenceField
Source§fn clone(&self) -> DecoherenceField
fn clone(&self) -> DecoherenceField
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more