3 #include "raytracer/simulation_parameters.h" 10 constexpr
auto mean_hits_per_interval(
const simulation_parameters& params,
11 double speed_of_sound,
13 return (params.rays * M_PI * params.receiver_radius *
14 params.receiver_radius * speed_of_sound) /
15 (room_volume * params.histogram_sample_rate);
18 constexpr
auto required_rays(
double hits_per_interval,
19 double receiver_radius,
20 double speed_of_sound,
21 double histogram_sample_rate,
23 return (hits_per_interval * room_volume * histogram_sample_rate) /
24 (M_PI * receiver_radius * receiver_radius * speed_of_sound);
27 constexpr
auto make_simulation_parameters(
28 double hits_per_interval,
29 double receiver_radius,
30 double speed_of_sound,
31 double histogram_sample_rate,
33 size_t maximum_image_source_order) {
34 return simulation_parameters{
35 static_cast<size_t>(required_rays(hits_per_interval,
38 histogram_sample_rate,
40 maximum_image_source_order,
42 histogram_sample_rate};
Definition: pressure.h:22
Definition: capsule_base.h:9