src/vertexmap.h

changeset 340
e17e07661f4c
parent 338
719b909a7d2b
equal deleted inserted replaced
339:4787d05e9c89 340:e17e07661f4c
17 //std::set<ElementId> objects; 17 //std::set<ElementId> objects;
18 bool transformSet = false; 18 bool transformSet = false;
19 glm::mat4 transform; 19 glm::mat4 transform;
20 }; 20 };
21 using ApplyFunction = std::function<void(const glm::vec3&, const VertexInfo&)>; 21 using ApplyFunction = std::function<void(const glm::vec3&, const VertexInfo&)>;
22 VertexMap(const Model *model); 22 VertexMap(const QTextDocument *model);
23 Q_SLOT void build(); 23 Q_SLOT void build();
24 void apply(ApplyFunction fn) const; 24 void apply(ApplyFunction fn) const;
25 Q_SIGNALS: 25 Q_SIGNALS:
26 Q_SIGNAL void verticesChanged(); 26 Q_SIGNAL void verticesChanged();
27 private: 27 private:
28 const Model* const model; 28 const QTextDocument* const model;
29 QSet<hash_t> vertexHashes; 29 QSet<hash_t> vertexHashes;
30 std::vector<glm::vec3> vertices; 30 std::vector<glm::vec3> vertices;
31 std::map<hash_t, VertexInfo> map; 31 std::map<hash_t, VertexInfo> map;
32 }; 32 };
33 33

mercurial