Wed, 15 Jun 2022 12:32:50 +0300
Fix crash involving polygon being too empty
#pragma once #include "basics.h" #include "model.h" #include "gl/common.h" template<typename T> struct WithId : T { ModelId id; }; struct GetPolygonsContext { ModelId modelId; class DocumentManager* documents; }; struct PolygonCache { using vector_type = std::vector<WithId<PolygonElement>>; vector_type cachedPolygons; bool needRecache = true; }; const PolygonCache::vector_type* getCachedPolygons( PolygonCache* cache, Model* model, class DocumentManager* documents); PolygonCache* findPolygonCacheForModel(Model* model, DocumentManager* context);