Rev | Line | |
---|
[3242] | 1 | #ifndef _VISIBILITYSOLUTIONLOADER_H
|
---|
| 2 | #define _VISIBILITYSOLUTIONLOADER_H
|
---|
| 3 |
|
---|
[3243] | 4 | #include "common.h"
|
---|
[3242] | 5 |
|
---|
[3243] | 6 |
|
---|
[3242] | 7 | namespace CHCDemoEngine
|
---|
| 8 | {
|
---|
| 9 |
|
---|
[3243] | 10 | class ViewCellsTree;
|
---|
| 11 | struct ViewCell;
|
---|
| 12 | class Bvh;
|
---|
| 13 |
|
---|
| 14 | typedef std::vector<ViewCell *> ViewCellsContainer;
|
---|
| 15 |
|
---|
| 16 |
|
---|
[3242] | 17 | /** Loads a preprocessed visibility solution.
|
---|
| 18 | */
|
---|
| 19 | class VisibilitySolutionLoader
|
---|
| 20 | {
|
---|
| 21 | public:
|
---|
| 22 |
|
---|
[3243] | 23 | VisibilitySolutionLoader(): mNumNodes(0) {};
|
---|
[3242] | 24 |
|
---|
[3257] | 25 | ViewCellsTree *Load(const std::string &filename, Bvh *bvh, float viewCellsScaleFactor = 1.0f);
|
---|
[3242] | 26 |
|
---|
| 27 |
|
---|
| 28 | protected:
|
---|
[3243] | 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);
|
---|
[3242] | 33 |
|
---|
[3243] | 34 | bool LoadPvs(FILE *fw, Bvh *bvh);
|
---|
| 35 |
|
---|
| 36 | void AllocateLeafViewCells(ViewCellsTree *viewCellsTree);
|
---|
| 37 |
|
---|
| 38 |
|
---|
| 39 | ///////////////
|
---|
| 40 |
|
---|
[3242] | 41 | int mNumNodes;
|
---|
[3243] | 42 |
|
---|
| 43 | ViewCellsContainer mViewCells;
|
---|
[3242] | 44 | };
|
---|
| 45 |
|
---|
| 46 | }
|
---|
| 47 |
|
---|
| 48 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.