src/polygoncache.h

Tue, 15 Mar 2022 19:48:07 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Tue, 15 Mar 2022 19:48:07 +0200
changeset 185
a38a0eb007b0
parent 183
97b591813c8b
child 193
b4beff48bb7a
permissions
-rw-r--r--

Added line path tool

#pragma once
#include "main.h"
#include "model.h"

class PolygonCache : QObject
{
	Q_OBJECT
public:
	PolygonCache(Model* model);
	const std::vector<gl::Polygon>& getPolygons(class DocumentManager* documents);
private:
	void getObjectPolygons(
		const int index,
		std::vector<gl::Polygon>& polygons_out,
		ldraw::GetPolygonsContext* context) const;
	Model* const model;
	std::vector<gl::Polygon> cachedPolygons;
	bool needRecache = true;
};

mercurial