Line | |
---|
1 | #ifndef _VISIBILITYSOLUTIONLOADER_H
|
---|
2 | #define _VISIBILITYSOLUTIONLOADER_H
|
---|
3 |
|
---|
4 | #include "common.h"
|
---|
5 |
|
---|
6 |
|
---|
7 | namespace CHCDemoEngine
|
---|
8 | {
|
---|
9 |
|
---|
10 | class ViewCellsTree;
|
---|
11 | struct ViewCell;
|
---|
12 | class Bvh;
|
---|
13 |
|
---|
14 | typedef std::vector<ViewCell *> ViewCellsContainer;
|
---|
15 |
|
---|
16 |
|
---|
17 | /** Loads a preprocessed visibility solution.
|
---|
18 | */
|
---|
19 | class VisibilitySolutionLoader
|
---|
20 | {
|
---|
21 | public:
|
---|
22 |
|
---|
23 | VisibilitySolutionLoader(): mNumNodes(0) {};
|
---|
24 |
|
---|
25 | ViewCellsTree *Load(const std::string &filename, Bvh *bvh);
|
---|
26 |
|
---|
27 |
|
---|
28 | protected:
|
---|
29 | /** Creates list of bvh nodes where the index
|
---|
30 | is equivalent to the id of this node in the bvh.
|
---|
31 | */
|
---|
32 | bool CreateIdSortedList(Bvh *bvh, BvhNodeContainer &nodes);
|
---|
33 |
|
---|
34 | bool LoadPvs(FILE *fw, Bvh *bvh);
|
---|
35 |
|
---|
36 | void AllocateLeafViewCells(ViewCellsTree *viewCellsTree);
|
---|
37 |
|
---|
38 |
|
---|
39 | ///////////////
|
---|
40 |
|
---|
41 | int mNumNodes;
|
---|
42 |
|
---|
43 | ViewCellsContainer mViewCells;
|
---|
44 | };
|
---|
45 |
|
---|
46 | }
|
---|
47 |
|
---|
48 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.