+ | Optimization + reflection

This commit is contained in:
TheRedShip
2025-01-02 16:33:21 +01:00
parent 21f2e84b61
commit 5d92a82b66
14 changed files with 204 additions and 101 deletions

View File

@ -14,10 +14,16 @@
SceneParser::SceneParser(Scene *scene) : _scene(scene)
{
object_parsers["sp"] = [](std::stringstream& ss) -> Object*
object_parsers["sp"] = [](std::stringstream &ss) -> Object *
{
try { return (new Sphere(ss)); }
catch (const std::exception& e) { throw; }
catch (const std::exception &e) { throw; }
};
object_parsers["pl"] = [](std::stringstream &ss) -> Object *
{
try { return (new Plane(ss)); }
catch (const std::exception &e) { throw; }
};
}