pub struct RoomConfig {
pub room: RoomGeometryConfig,
pub sources: Vec<SourceConfig>,
pub listening_positions: Vec<Point3DConfig>,
pub frequencies: FrequencyConfig,
pub boundaries: BoundaryConfig,
pub solver: SolverConfig,
pub visualization: VisualizationConfig,
pub metadata: MetadataConfig,
}Expand description
Complete room configuration loaded from JSON
Fields§
§room: RoomGeometryConfigRoom geometry specification
sources: Vec<SourceConfig>Sound sources
listening_positions: Vec<Point3DConfig>Listening positions
frequencies: FrequencyConfigFrequency configuration
boundaries: BoundaryConfigBoundary conditions
solver: SolverConfigSolver configuration
visualization: VisualizationConfigVisualization configuration
metadata: MetadataConfigSimulation metadata
Implementations§
Source§impl RoomConfig
impl RoomConfig
Sourcepub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self, String>
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self, String>
Load configuration from JSON file
Sourcepub fn to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), String>
pub fn to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), String>
Save configuration to JSON file
Sourcepub fn to_simulation(&self) -> Result<RoomSimulation, String>
pub fn to_simulation(&self) -> Result<RoomSimulation, String>
Convert to RoomSimulation
Trait Implementations§
Source§impl Clone for RoomConfig
impl Clone for RoomConfig
Source§fn clone(&self) -> RoomConfig
fn clone(&self) -> RoomConfig
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 moreSource§impl Debug for RoomConfig
impl Debug for RoomConfig
Source§impl<'de> Deserialize<'de> for RoomConfig
impl<'de> Deserialize<'de> for RoomConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RoomConfig
impl RefUnwindSafe for RoomConfig
impl Send for RoomConfig
impl Sync for RoomConfig
impl Unpin for RoomConfig
impl UnwindSafe for RoomConfig
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> 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