pub struct TensorFieldConfig {
pub flat_threshold_low: f32,
pub flat_threshold_high: f32,
pub jitter_amplitude: f32,
pub jitter_frequency: f32,
}Expand description
Configuration for TensorField sampling.
Slope (the magnitude of the normal’s XZ projection) controls a smooth blend between terrain-derived directions and an axis-aligned fallback, avoiding the abrupt regime change at near-zero slopes that produced visible artefacts at the boundary.
Fields§
§flat_threshold_low: f32Slope at or below which the field returns the pure axis-aligned
fallback. Default: 1e-4.
flat_threshold_high: f32Slope at or above which the field returns pure terrain-derived
directions. Default: 1e-3.
jitter_amplitude: f32Amplitude of low-frequency directional jitter, in radians. Small
values (e.g. 0.05–0.2) break perfectly parallel streamlines on
flat terrain. Default: 0.0 (disabled).
jitter_frequency: f32Spatial frequency of the jitter (cycles per world unit). Lower
values produce larger, gentler swirls. Default: 0.01.
Trait Implementations§
Source§impl Clone for TensorFieldConfig
impl Clone for TensorFieldConfig
Source§fn clone(&self) -> TensorFieldConfig
fn clone(&self) -> TensorFieldConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TensorFieldConfig
impl Debug for TensorFieldConfig
Source§impl Default for TensorFieldConfig
impl Default for TensorFieldConfig
Source§impl<'de> Deserialize<'de> for TensorFieldConfig
impl<'de> Deserialize<'de> for TensorFieldConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TensorFieldConfig
impl RefUnwindSafe for TensorFieldConfig
impl Send for TensorFieldConfig
impl Sync for TensorFieldConfig
impl Unpin for TensorFieldConfig
impl UnsafeUnpin for TensorFieldConfig
impl UnwindSafe for TensorFieldConfig
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
Mutably borrows from an owned value. Read more