#pragma once #include #include #include "script/lua_helpers.hpp" #include "core/vertex.hpp" #include #include #include #include namespace sdl3cpp::script { class SceneManager { public: struct SceneObject { std::vector vertices; std::vector indices; int computeModelMatrixRef = LUA_REFNIL; std::string shaderKey = "default"; }; explicit SceneManager(lua_State* L); std::vector LoadSceneObjects(); std::array ComputeModelMatrix(int functionRef, float time); std::array GetViewProjectionMatrix(float aspect); private: lua_State* L_; std::vector ReadVertexArray(int index); std::vector ReadIndexArray(int index); std::string GetLuaError(); }; } // namespace sdl3cpp::script