pub struct RayMarchConfig {
pub view_dir: [f32; 3],
pub light_dir: [f32; 3],
pub step_size: f32,
pub max_steps: u32,
pub vertical_exaggeration: f32,
pub pixel_size_world: f32,
}Expand description
Configuration parameters for the DEM ray-marching kernel.
All vectors use a right-handed coordinate system where X runs east, Y runs north, and Z runs upward.
Fields§
§view_dir: [f32; 3]Unit-vector describing the view direction (from eye toward scene).
Defaults to [0, 0, -1] (top-down orthographic).
light_dir: [f32; 3]Unit-vector pointing toward the light source.
Defaults to the normalised (1, 1, 1) diagonal.
step_size: f32World-space distance advanced per march step.
Must be > 0.
max_steps: u32Maximum number of steps before the ray is considered unoccluded.
Must be > 0.
vertical_exaggeration: f32Factor applied to DEM elevations before ray-height comparisons.
Set to > 1.0 to exaggerate terrain relief.
pixel_size_world: f32Real-world length of one DEM pixel (in the same units as elevations). Used to convert pixel-space step offsets to world-space distances.
Implementations§
Trait Implementations§
Source§impl Clone for RayMarchConfig
impl Clone for RayMarchConfig
Source§fn clone(&self) -> RayMarchConfig
fn clone(&self) -> RayMarchConfig
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 RayMarchConfig
impl Debug for RayMarchConfig
Auto Trait Implementations§
impl Freeze for RayMarchConfig
impl RefUnwindSafe for RayMarchConfig
impl Send for RayMarchConfig
impl Sync for RayMarchConfig
impl Unpin for RayMarchConfig
impl UnsafeUnpin for RayMarchConfig
impl UnwindSafe for RayMarchConfig
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