pub struct VolumeConfig {
pub field_index: u32,
pub steps: u32,
pub density_scale: f32,
pub palette: Palette,
pub threshold: f32,
pub additive: bool,
}Expand description
Configuration for volume rendering.
Fields§
§field_index: u32Which field index to render (default: 0).
steps: u32Number of ray march steps (higher = better quality, slower).
density_scale: f32Density multiplier (higher = more opaque).
palette: PaletteColor palette for density mapping.
threshold: f32Minimum density threshold (values below are transparent).
additive: boolWhether to use additive blending (glow effect).
Implementations§
Source§impl VolumeConfig
impl VolumeConfig
Sourcepub fn with_field(self, index: u32) -> Self
pub fn with_field(self, index: u32) -> Self
Set the field index to render.
Sourcepub fn with_steps(self, steps: u32) -> Self
pub fn with_steps(self, steps: u32) -> Self
Set the number of ray march steps.
Sourcepub fn with_density_scale(self, scale: f32) -> Self
pub fn with_density_scale(self, scale: f32) -> Self
Set the density scale multiplier.
Sourcepub fn with_palette(self, palette: Palette) -> Self
pub fn with_palette(self, palette: Palette) -> Self
Set the color palette.
Sourcepub fn with_threshold(self, threshold: f32) -> Self
pub fn with_threshold(self, threshold: f32) -> Self
Set the minimum density threshold.
Sourcepub fn with_additive(self, additive: bool) -> Self
pub fn with_additive(self, additive: bool) -> Self
Enable or disable additive blending.
Trait Implementations§
Source§impl Clone for VolumeConfig
impl Clone for VolumeConfig
Source§fn clone(&self) -> VolumeConfig
fn clone(&self) -> VolumeConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 VolumeConfig
impl Debug for VolumeConfig
Auto Trait Implementations§
impl Freeze for VolumeConfig
impl RefUnwindSafe for VolumeConfig
impl Send for VolumeConfig
impl Sync for VolumeConfig
impl Unpin for VolumeConfig
impl UnwindSafe for VolumeConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.