src/polygoncache.h

Wed, 29 Jun 2022 14:11:58 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Wed, 29 Jun 2022 14:11:58 +0300
changeset 305
d891da20abca
parent 264
76a025db4948
child 309
d862721d19a3
permissions
-rw-r--r--

Add support for BFC CERTIFY statements

#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 polygons;
	bool needRecache = true;
};

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

mercurial