pub struct VisionConfig {Show 16 fields
pub cone_half_angle: f32,
pub cone_taper: f32,
pub range: f32,
pub peripheral_range: f32,
pub edge_taper: f32,
pub decks: Vec<DeckBand>,
pub light_gate: Option<LightGate>,
pub fade_in: f32,
pub fade_out: f32,
pub memory_intensity: u8,
pub memory_decay: f32,
pub memory_floor: u8,
pub heard_radius: f32,
pub heard_duration: f32,
pub memory_dim: f32,
pub memory_desaturate: f32,
}Expand description
All FW tuning in one place. Geometry fields are in cells (mip-0
voxels) and radians; rates are intensity units (0..=63) per
second. The styling knobs at the bottom are read by the renderers
from FW.2 on — unread in FW.0.
Fields§
§cone_half_angle: f32Half-angle of the facing cone, radians.
cone_taper: f32Angular taper band inside the half-angle over which intensity falls to zero (smooth cone rim), radians.
range: f32Facing-cone reach, cells.
peripheral_range: f32360° close-range vision, cells (an observer is never blind in their own back at arm’s length).
edge_taper: f32Radial taper band inside range / peripheral_range /
heard-blob radii, cells.
decks: Vec<DeckBand>The decks, index-aligned with FowObserver::deck and every
per-deck query. Must stay the same length across
FogOfWar::set_config calls (layers are keyed by index).
light_gate: Option<LightGate>Decision 5 — None = geometric visibility only.
fade_in: f32Intensity rise rate toward a live (Visible/Heard) target.
fade_out: f32Intensity fall rate when leaving sight, down to
memory_intensity.
memory_intensity: u8Where a freshly-demoted Memory cell settles before slow decay.
memory_decay: f32Decision 7 — slow decay rate from memory_intensity toward
memory_floor. 0 = memories never fade.
memory_floor: u8Decayed-memory minimum intensity — old memories stay barely readable rather than vanishing back to Unseen.
heard_radius: f32Heard-blob radius in cells per unit of loudness.
heard_duration: f32Seconds a heard blob stays live before fading out.
memory_dim: f32FW.2+ styling: Memory/Heard brightness multiplier.
memory_desaturate: f32FW.2+ styling: Memory/Heard desaturation amount 0..=1.
Implementations§
Source§impl VisionConfig
impl VisionConfig
Sourcepub fn for_decks(decks: Vec<DeckBand>) -> Self
pub fn for_decks(decks: Vec<DeckBand>) -> Self
Defaults tuned for ship scale (~1 voxel ≈ 10 cm): a 120° cone reaching 96 cells, 12-cell peripheral, light gate off.
Sourcepub fn deck_for_z(&self, z: i32) -> Option<usize>
pub fn deck_for_z(&self, z: i32) -> Option<usize>
Index of the deck whose [z_top, z_bottom] contains grid-local
z (the head-follow deck pick, CA round-3 convention: feed the
HEAD z, not the feet).
Trait Implementations§
Source§impl Clone for VisionConfig
impl Clone for VisionConfig
Source§fn clone(&self) -> VisionConfig
fn clone(&self) -> VisionConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VisionConfig
impl Debug for VisionConfig
Source§impl PartialEq for VisionConfig
impl PartialEq for VisionConfig
impl StructuralPartialEq for VisionConfig
Auto Trait Implementations§
impl Freeze for VisionConfig
impl RefUnwindSafe for VisionConfig
impl Send for VisionConfig
impl Sync for VisionConfig
impl Unpin for VisionConfig
impl UnsafeUnpin for VisionConfig
impl UnwindSafe for VisionConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more