src/polygoncache.h

Mon, 27 Jun 2022 02:00:49 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Mon, 27 Jun 2022 02:00:49 +0300
changeset 270
1202b102a10b
parent 264
76a025db4948
child 305
d891da20abca
permissions
-rw-r--r--

Fix qrc path in mainwindow.ui

#pragma once
#include "src/basics.h"
#include "src/model.h"
#include "src/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);

mercurial