--- a/src/polygoncache.h Wed May 25 17:25:24 2022 +0300 +++ b/src/polygoncache.h Wed May 25 17:42:02 2022 +0300 @@ -2,18 +2,13 @@ #include "main.h" #include "model.h" -class PolygonCache : QObject +struct PolygonCache { - Q_OBJECT -public: - PolygonCache(Model* model); - const std::vector<gl::Polygon>& getPolygons(class DocumentManager* documents); -private: - void getObjectPolygons( - const int index, - std::vector<gl::Polygon>& polygons_out, - ldraw::GetPolygonsContext* context) const; - Model* const model; std::vector<gl::Polygon> cachedPolygons; bool needRecache = true; }; + +const std::vector<gl::Polygon>& getCachedPolygons( + PolygonCache* cache, + Model* model, + class DocumentManager* documents);