pub struct SliceRenderer {
pub slices: Vec<SliceConfig>,
/* private fields */
}Expand description
Renderer for 2D slices through 3D data.
Fields§
§slices: Vec<SliceConfig>Active slices
Implementations§
Source§impl SliceRenderer
impl SliceRenderer
pub fn new() -> Self
Sourcepub fn add_slice(&mut self, config: SliceConfig)
pub fn add_slice(&mut self, config: SliceConfig)
Add a slice configuration.
Sourcepub fn remove_slice(&mut self, index: usize)
pub fn remove_slice(&mut self, index: usize)
Remove a slice by index.
Sourcepub fn set_max_pressure(&mut self, max: f32)
pub fn set_max_pressure(&mut self, max: f32)
Set the maximum pressure for color normalization.
Sourcepub fn generate_vertices(
&self,
grid: &SimulationGrid3D,
grid_physical_size: (f32, f32, f32),
) -> Vec<Vertex3D>
pub fn generate_vertices( &self, grid: &SimulationGrid3D, grid_physical_size: (f32, f32, f32), ) -> Vec<Vertex3D>
Generate vertices for all slices.
Sourcepub fn generate_slice_vertices(
&self,
grid: &SimulationGrid3D,
grid_physical_size: (f32, f32, f32),
config: &SliceConfig,
) -> Vec<Vertex3D>
pub fn generate_slice_vertices( &self, grid: &SimulationGrid3D, grid_physical_size: (f32, f32, f32), config: &SliceConfig, ) -> Vec<Vertex3D>
Generate vertices for a single slice.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SliceRenderer
impl RefUnwindSafe for SliceRenderer
impl Send for SliceRenderer
impl Sync for SliceRenderer
impl Unpin for SliceRenderer
impl UnwindSafe for SliceRenderer
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> 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