pub struct SurfacePlot {Show 14 fields
pub x_data: Vec<f64>,
pub y_data: Vec<f64>,
pub z_data: Vec<Vec<f64>>,
pub colormap: ColorMap,
pub shading_mode: ShadingMode,
pub wireframe: bool,
pub alpha: f32,
pub lighting_enabled: bool,
pub ambient_strength: f32,
pub diffuse_strength: f32,
pub specular_strength: f32,
pub shininess: f32,
pub label: Option<String>,
pub visible: bool,
/* private fields */
}Expand description
High-performance GPU-accelerated 3D surface plot
Fields§
§x_data: Vec<f64>Grid data (Z values at X,Y coordinates)
y_data: Vec<f64>§z_data: Vec<Vec<f64>>§colormap: ColorMapSurface properties
shading_mode: ShadingMode§wireframe: bool§alpha: f32§lighting_enabled: boolLighting and material
ambient_strength: f32§diffuse_strength: f32§specular_strength: f32§shininess: f32§label: Option<String>Metadata
visible: boolImplementations§
Source§impl SurfacePlot
impl SurfacePlot
Sourcepub fn new(
x_data: Vec<f64>,
y_data: Vec<f64>,
z_data: Vec<Vec<f64>>,
) -> Result<Self, String>
pub fn new( x_data: Vec<f64>, y_data: Vec<f64>, z_data: Vec<Vec<f64>>, ) -> Result<Self, String>
Create a new surface plot from meshgrid data
Sourcepub fn from_function<F>(
x_range: (f64, f64),
y_range: (f64, f64),
resolution: (usize, usize),
func: F,
) -> Result<Self, String>
pub fn from_function<F>( x_range: (f64, f64), y_range: (f64, f64), resolution: (usize, usize), func: F, ) -> Result<Self, String>
Create surface from a function
Sourcepub fn with_colormap(self, colormap: ColorMap) -> Self
pub fn with_colormap(self, colormap: ColorMap) -> Self
Set color mapping
Sourcepub fn with_shading(self, shading: ShadingMode) -> Self
pub fn with_shading(self, shading: ShadingMode) -> Self
Set shading mode
Sourcepub fn with_wireframe(self, enabled: bool) -> Self
pub fn with_wireframe(self, enabled: bool) -> Self
Enable/disable wireframe
Sourcepub fn with_alpha(self, alpha: f32) -> Self
pub fn with_alpha(self, alpha: f32) -> Self
Set transparency
Sourcepub fn with_label<S: Into<String>>(self, label: S) -> Self
pub fn with_label<S: Into<String>>(self, label: S) -> Self
Set plot label for legends
Sourcepub fn bounds(&mut self) -> BoundingBox
pub fn bounds(&mut self) -> BoundingBox
Get the bounding box of the surface
Sourcepub fn statistics(&self) -> SurfaceStatistics
pub fn statistics(&self) -> SurfaceStatistics
Get plot statistics for debugging
Sourcepub fn estimated_memory_usage(&self) -> usize
pub fn estimated_memory_usage(&self) -> usize
Estimate memory usage in bytes
Sourcepub fn render_data(&mut self) -> RenderData
pub fn render_data(&mut self) -> RenderData
Generate complete render data for the graphics pipeline
Trait Implementations§
Source§impl Clone for SurfacePlot
impl Clone for SurfacePlot
Source§fn clone(&self) -> SurfacePlot
fn clone(&self) -> SurfacePlot
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 moreAuto Trait Implementations§
impl Freeze for SurfacePlot
impl RefUnwindSafe for SurfacePlot
impl Send for SurfacePlot
impl Sync for SurfacePlot
impl Unpin for SurfacePlot
impl UnwindSafe for SurfacePlot
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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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