diff -r e1ced2523cad -r b6cbba6e29a1 src/polygoncache.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/polygoncache.h Thu Mar 03 11:42:52 2022 +0200 @@ -0,0 +1,19 @@ +#pragma once +#include "main.h" +#include "model.h" + +class PolygonCache : QObject +{ + Q_OBJECT +public: + PolygonCache(Model* model); + 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; +};