38 std::vector<std::string> _ids;
39 ManagerMap<Interfaces::ITexture> _textures;
40 ManagerMap<Interfaces::IHittable> _effects;
41 ManagerMap<Interfaces::IMaterial> _materials;
42 ManagerMap<Interfaces::IHittable> _shapes;
43 std::unordered_map<std::string,
44 std::function<std::shared_ptr<Interfaces::IArguments>(
45 libconfig::Setting &)>>
47 std::unordered_map<std::string,
53 bool parse(std::string path);
60 template <
typename I,
typename E>
61 requires std::is_enum_v<E>
63 const libconfig::Setting &arguments, ManagerMap<I> &containerMap);
64 static Utils::Color parseColor(
const libconfig::Setting &color);
66 std::shared_ptr<I> retrieve(
const libconfig::Setting &arguments,
67 ManagerMap<I> &containerMap,
const std::string &name);
68 std::shared_ptr<Raytracer::Interfaces::IArguments> create(
69 const std::string &type, libconfig::Setting &args);
70 void parseCamera(
const libconfig::Setting &camera);
71 void parseImports(
const libconfig::Setting &imports);
73 requires std::is_arithmetic_v<T>
74 std::optional<T> parseOptional(
75 const libconfig::Setting &setting, std::string &name);
77 requires std::is_same_v<T, Raytracer::Utils::Vec3>
78 std::optional<T> parseOptional(
79 const libconfig::Setting &setting, std::string &name);
80 template <std::
size_t I>
81 void extract(
const libconfig::Setting &setting,
82 std::array<std::string, 10> &keys);
83 template <std::size_t... Is>
84 void parseCameraHelper(
const libconfig::Setting &camera,
85 std::array<std::string, 10> &keys, std::index_sequence<Is...>);