4 #include "relative_clock.hpp"
16 static constexpr
unsigned width_pixels = 2560;
19 static constexpr
unsigned height_pixels = 1440;
22 static constexpr
float width_meters = 0.11047f;
25 static constexpr
float height_meters = 0.06214f;
28 static constexpr
float lens_separation = width_meters / 2.0f;
31 static constexpr
float lens_vertical_position = height_meters / 2.0f;
34 static constexpr
float fov_x = 90.0f;
37 static constexpr
float fov_y = 90.0f;
40 static constexpr
float meters_per_tan_angle = width_meters / (2 * (fov_x * M_PI / 180.0f));
43 static constexpr
float ipd = 0.064f;
46 static constexpr
float frequency = 120.0f;
49 static constexpr duration period = freq2period(frequency);
52 static constexpr
float aberration[4] = {-0.016f, 0.0f, 0.024f, 0.0f};
58 static constexpr
float near_z = 0.1f;
61 static constexpr
float far_z = 20.0f;
68 std::string temp = var;
69 std::transform(temp.begin(), temp.end(), temp.begin(), ::toupper);
70 return (temp ==
"TRUE") ? true
71 : (temp ==
"FALSE") ?
false
72 :
throw std::runtime_error(
"Invalid conversion from std::string to bool");
76 inline std::string
getenv_or(
const std::string& var, std::string default_) {
77 if (std::getenv(var.c_str())) {
78 return {std::getenv(var.c_str())};
RAC_ERRNO_MSG.
Definition: data_format.hpp:15
std::string getenv_or(const std::string &var, std::string default_)
Temporary environment variable getter. Not needed once #198 is merged.
Definition: global_module_defs.hpp:76
bool str_to_bool(const std::string &var)
Convert a string containing a (python) boolean to the bool type.
Definition: global_module_defs.hpp:67
Display parameters.
Definition: global_module_defs.hpp:14
Rendering parameters.
Definition: global_module_defs.hpp:56