pub struct GuiState {Show 31 fields
pub is_playing: bool,
pub simulation_speed: f32,
pub steps_per_frame: u32,
pub temperature_c: f32,
pub humidity_percent: f32,
pub medium: Medium,
pub xy_slice_position: f32,
pub xz_slice_position: f32,
pub yz_slice_position: f32,
pub show_xy_slice: bool,
pub show_xz_slice: bool,
pub show_yz_slice: bool,
pub source_x: f32,
pub source_y: f32,
pub source_z: f32,
pub source_amplitude: f32,
pub source_frequency: f32,
pub source_type_idx: usize,
pub listener_x: f32,
pub listener_y: f32,
pub listener_z: f32,
pub listener_yaw: f32,
pub show_listener: bool,
pub color_map_idx: usize,
pub auto_scale: bool,
pub max_pressure: f32,
pub slice_opacity: f32,
pub show_bounding_box: bool,
pub show_floor_grid: bool,
pub show_sources: bool,
pub show_info_panel: bool,
}Expand description
GUI state for the simulation.
Fields§
§is_playing: bool§simulation_speed: f32§steps_per_frame: u32§temperature_c: f32§humidity_percent: f32§medium: Medium§xy_slice_position: f32§xz_slice_position: f32§yz_slice_position: f32§show_xy_slice: bool§show_xz_slice: bool§show_yz_slice: bool§source_x: f32§source_y: f32§source_z: f32§source_amplitude: f32§source_frequency: f32§source_type_idx: usize§listener_x: f32§listener_y: f32§listener_z: f32§listener_yaw: f32§show_listener: bool§color_map_idx: usize§auto_scale: bool§max_pressure: f32§slice_opacity: f32§show_bounding_box: bool§show_floor_grid: bool§show_sources: bool§show_info_panel: boolImplementations§
Source§impl GuiState
impl GuiState
Sourcepub fn source_type_name(&self) -> &'static str
pub fn source_type_name(&self) -> &'static str
Get the selected source type name.
Sourcepub fn create_source(&self, grid_size: (f32, f32, f32)) -> AudioSource
pub fn create_source(&self, grid_size: (f32, f32, f32)) -> AudioSource
Create an audio source from current settings.
Sourcepub fn source_position(&self, grid_size: (f32, f32, f32)) -> Position3D
pub fn source_position(&self, grid_size: (f32, f32, f32)) -> Position3D
Get source position in world coordinates.
Sourcepub fn listener_position(&self, grid_size: (f32, f32, f32)) -> Position3D
pub fn listener_position(&self, grid_size: (f32, f32, f32)) -> Position3D
Get listener position in world coordinates.
Sourcepub fn slice_configs(&self) -> Vec<SliceConfig>
pub fn slice_configs(&self) -> Vec<SliceConfig>
Create slice configurations from state.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GuiState
impl RefUnwindSafe for GuiState
impl Send for GuiState
impl Sync for GuiState
impl Unpin for GuiState
impl UnwindSafe for GuiState
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