pub struct Isosurface { /* private fields */ }Expand description
One iso-surface of a ScalarField3D: an iso-level and a solid colour.
Port of silx plot3d.items.volume.Isosurface. The level is either a fixed
value or computed from the parent field by an auto-level function (silx
setAutoLevelFunction; e.g. mean_plus_std); the resolved value is stored
in level and refreshed by the owning ScalarField3D whenever the data
changes. The surface itself is built and emitted by the parent (the data lives
there), as a lit solid-colour mesh through the P1.2 mesh path.
Implementations§
Source§impl Isosurface
impl Isosurface
Sourcepub fn new_auto(auto: fn(&[f32]) -> f32, color: Color32) -> Self
pub fn new_auto(auto: fn(&[f32]) -> f32, color: Color32) -> Self
An auto-level iso-surface: level is recomputed by auto(data) each time
the parent field changes (silx setAutoLevelFunction).
Sourcepub fn level(&self) -> f32
pub fn level(&self) -> f32
The resolved iso-level (NaN if an auto-level has not yet been computed against data).
Sourcepub fn set_level(&mut self, level: f32)
pub fn set_level(&mut self, level: f32)
Set a fixed iso-level, clearing any auto-level function (silx setLevel).
Sourcepub fn set_auto_level(&mut self, auto: fn(&[f32]) -> f32)
pub fn set_auto_level(&mut self, auto: fn(&[f32]) -> f32)
Set the auto-level function (silx setAutoLevelFunction); takes effect on
the next parent data update.
Sourcepub fn is_auto_level(&self) -> bool
pub fn is_auto_level(&self) -> bool
True when the level is computed by an auto-level function.
Trait Implementations§
Source§impl Clone for Isosurface
impl Clone for Isosurface
Source§fn clone(&self) -> Isosurface
fn clone(&self) -> Isosurface
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for Isosurface
impl RefUnwindSafe for Isosurface
impl Send for Isosurface
impl Sync for Isosurface
impl Unpin for Isosurface
impl UnsafeUnpin for Isosurface
impl UnwindSafe for Isosurface
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.