src/polygoncache.h

Mon, 04 Jul 2022 00:19:18 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Mon, 04 Jul 2022 00:19:18 +0300
changeset 329
6d75fa09cc0c
parent 309
d862721d19a3
child 333
07e65a4c6611
permissions
-rw-r--r--

fix some issues like subfile references not showing up properly

#pragma once
#include "src/basics.h"
#include "src/model.h"
#include "src/gl/common.h"
#include "src/documentmanager.h"

template<typename T>
struct WithId : T
{
	ElementId id;
};

struct GetPolygonsContext
{
	ModelId modelId;
	class DocumentManager* documents;
};

struct PolygonCache
{
	using vector_type = std::vector<WithId<PolygonElement>>;
	vector_type polygons;
	bool needRecache = true;
};

void recacheIfNeeded(
	PolygonCache* cache,
	Model* model,
	class DocumentManager* documents);
PolygonCache* findPolygonCacheForModel(Model* model, DocumentManager* context);

mercurial