File tree Expand file tree Collapse file tree 4 files changed +387
-395
lines changed
Expand file tree Collapse file tree 4 files changed +387
-395
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,47 @@ namespace vsg
4848 std::vector<const PagedLOD*> newHighresRequired;
4949 };
5050
51+ struct PagedLODContainer : public Inherit <Object, PagedLODContainer>
52+ {
53+ explicit PagedLODContainer (uint32_t maxNumPagedLOD = 10000 );
54+
55+ struct List
56+ {
57+ uint32_t head = 0 ;
58+ uint32_t tail = 0 ;
59+ uint32_t count = 0 ;
60+ std::string name;
61+ };
62+
63+ struct Element
64+ {
65+ uint32_t previous = 0 ;
66+ uint32_t next = 0 ;
67+ ref_ptr<PagedLOD> plod;
68+ List* list = nullptr ;
69+ };
70+
71+ using Elements = std::vector<Element>;
72+
73+ Elements elements;
74+ List availableList;
75+ List inactiveList;
76+ List activeList;
77+
78+ void resize (uint32_t new_size);
79+ void resize ();
80+ void inactive (const PagedLOD* plod);
81+ void active (const PagedLOD* plod);
82+ void remove (PagedLOD* plod);
83+
84+ void _move (const PagedLOD* plod, List* targetList);
85+
86+ bool check ();
87+ bool check (const List& list);
88+
89+ void print (std::ostream& out);
90+ };
91+
5192 // / Thread safe queue for tracking PagedLOD that needs to be loaded, compiled or merged by the DatabasePager
5293 class VSG_DECLSPEC DatabaseQueue : public Inherit<Object, DatabaseQueue>
5394 {
Original file line number Diff line number Diff line change @@ -108,45 +108,4 @@ namespace vsg
108108 };
109109 VSG_type_name (vsg::PagedLOD);
110110
111- struct PagedLODContainer : public Inherit <Object, PagedLODContainer>
112- {
113- explicit PagedLODContainer (uint32_t maxNumPagedLOD = 10000 );
114-
115- struct List
116- {
117- uint32_t head = 0 ;
118- uint32_t tail = 0 ;
119- uint32_t count = 0 ;
120- std::string name;
121- };
122-
123- struct Element
124- {
125- uint32_t previous = 0 ;
126- uint32_t next = 0 ;
127- ref_ptr<PagedLOD> plod;
128- List* list = nullptr ;
129- };
130-
131- using Elements = std::vector<Element>;
132-
133- Elements elements;
134- List availableList;
135- List inactiveList;
136- List activeList;
137-
138- void resize (uint32_t new_size);
139- void resize ();
140- void inactive (const PagedLOD* plod);
141- void active (const PagedLOD* plod);
142- void remove (PagedLOD* plod);
143-
144- void _move (const PagedLOD* plod, List* targetList);
145-
146- bool check ();
147- bool check (const List& list);
148-
149- void print (std::ostream& out);
150- };
151-
152111} // namespace vsg
You can’t perform that action at this time.
0 commit comments