1 #pragma once |
1 #pragma once |
2 #include "main.h" |
2 #include "main.h" |
3 #include "model.h" |
3 #include "model.h" |
4 |
4 |
5 class PolygonCache : QObject |
5 struct PolygonCache |
6 { |
6 { |
7 Q_OBJECT |
|
8 public: |
|
9 PolygonCache(Model* model); |
|
10 const std::vector<gl::Polygon>& getPolygons(class DocumentManager* documents); |
|
11 private: |
|
12 void getObjectPolygons( |
|
13 const int index, |
|
14 std::vector<gl::Polygon>& polygons_out, |
|
15 ldraw::GetPolygonsContext* context) const; |
|
16 Model* const model; |
|
17 std::vector<gl::Polygon> cachedPolygons; |
7 std::vector<gl::Polygon> cachedPolygons; |
18 bool needRecache = true; |
8 bool needRecache = true; |
19 }; |
9 }; |
|
10 |
|
11 const std::vector<gl::Polygon>& getCachedPolygons( |
|
12 PolygonCache* cache, |
|
13 Model* model, |
|
14 class DocumentManager* documents); |