pub struct VolumeGridCellScalarQuantity { /* private fields */ }Expand description
A scalar quantity defined at grid cells.
Implementations§
Source§impl VolumeGridCellScalarQuantity
impl VolumeGridCellScalarQuantity
Sourcepub fn new(
name: impl Into<String>,
structure_name: impl Into<String>,
values: Vec<f32>,
cell_dim: UVec3,
bound_min: Vec3,
bound_max: Vec3,
) -> Self
pub fn new( name: impl Into<String>, structure_name: impl Into<String>, values: Vec<f32>, cell_dim: UVec3, bound_min: Vec3, bound_max: Vec3, ) -> Self
Creates a new cell scalar quantity.
Sourcepub fn set_color_map(&mut self, name: impl Into<String>) -> &mut Self
pub fn set_color_map(&mut self, name: impl Into<String>) -> &mut Self
Sets the color map name.
Sourcepub fn data_range(&self) -> (f32, f32)
pub fn data_range(&self) -> (f32, f32)
Gets the data range.
Sourcepub fn set_data_range(&mut self, min: f32, max: f32) -> &mut Self
pub fn set_data_range(&mut self, min: f32, max: f32) -> &mut Self
Sets the data range.
Sourcepub fn gridcube_dirty(&self) -> bool
pub fn gridcube_dirty(&self) -> bool
Returns whether the gridcube needs GPU re-init.
Sourcepub fn gridcube_render_data(&self) -> Option<&GridcubeRenderData>
pub fn gridcube_render_data(&self) -> Option<&GridcubeRenderData>
Returns the gridcube render data.
Sourcepub fn gridcube_render_data_mut(&mut self) -> Option<&mut GridcubeRenderData>
pub fn gridcube_render_data_mut(&mut self) -> Option<&mut GridcubeRenderData>
Returns a mutable reference to the gridcube render data.
Sourcepub fn set_gridcube_render_data(&mut self, data: GridcubeRenderData)
pub fn set_gridcube_render_data(&mut self, data: GridcubeRenderData)
Sets the gridcube render data.
Sourcepub fn init_pick_resources(
&mut self,
device: &Device,
pick_bind_group_layout: &BindGroupLayout,
camera_buffer: &Buffer,
global_start: u32,
)
pub fn init_pick_resources( &mut self, device: &Device, pick_bind_group_layout: &BindGroupLayout, camera_buffer: &Buffer, global_start: u32, )
Initializes pick resources for this cell scalar quantity.
Sourcepub fn pick_bind_group(&self) -> Option<&BindGroup>
pub fn pick_bind_group(&self) -> Option<&BindGroup>
Returns the pick bind group, if initialized.
Sourcepub fn update_pick_uniforms(
&self,
queue: &Queue,
model: [[f32; 4]; 4],
cube_size_factor: f32,
)
pub fn update_pick_uniforms( &self, queue: &Queue, model: [[f32; 4]; 4], cube_size_factor: f32, )
Updates the pick uniform buffer with current model transform and cube size factor.
Sourcepub fn num_pick_elements(&self) -> u32
pub fn num_pick_elements(&self) -> u32
Returns the number of pick elements (= number of gridcube instances).
Sourcepub fn pick_total_vertices(&self) -> u32
pub fn pick_total_vertices(&self) -> u32
Returns the total vertices for the pick draw call.
Sourcepub fn build_egui_ui(&mut self, ui: &mut Ui, colormap_names: &[&str])
pub fn build_egui_ui(&mut self, ui: &mut Ui, colormap_names: &[&str])
Builds egui UI for this quantity.
Trait Implementations§
Source§impl Quantity for VolumeGridCellScalarQuantity
impl Quantity for VolumeGridCellScalarQuantity
Source§fn structure_name(&self) -> &str
fn structure_name(&self) -> &str
Returns the name of the parent structure.
Source§fn kind(&self) -> QuantityKind
fn kind(&self) -> QuantityKind
Returns the kind of this quantity.
Source§fn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
Returns whether this quantity is currently enabled/visible.
Source§fn set_enabled(&mut self, enabled: bool)
fn set_enabled(&mut self, enabled: bool)
Sets the enabled state of this quantity.
Source§fn clear_gpu_resources(&mut self)
fn clear_gpu_resources(&mut self)
Clears GPU render resources so they can be re-initialized with a new device.
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Returns a mutable reference to self as
Any for downcasting.Auto Trait Implementations§
impl Freeze for VolumeGridCellScalarQuantity
impl !RefUnwindSafe for VolumeGridCellScalarQuantity
impl Send for VolumeGridCellScalarQuantity
impl Sync for VolumeGridCellScalarQuantity
impl Unpin for VolumeGridCellScalarQuantity
impl !UnwindSafe for VolumeGridCellScalarQuantity
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> 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