diff -r e6faeffed1d1 -r b4beff48bb7a src/polygoncache.h --- 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& getPolygons(class DocumentManager* documents); -private: - void getObjectPolygons( - const int index, - std::vector& polygons_out, - ldraw::GetPolygonsContext* context) const; - Model* const model; std::vector cachedPolygons; bool needRecache = true; }; + +const std::vector& getCachedPolygons( + PolygonCache* cache, + Model* model, + class DocumentManager* documents);