source: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/VisibilitySolutionLoader.h @ 3257

Revision 3257, 863 bytes checked in by mattausch, 15 years ago (diff)
RevLine 
[3242]1#ifndef _VISIBILITYSOLUTIONLOADER_H
2#define _VISIBILITYSOLUTIONLOADER_H
3
[3243]4#include "common.h"
[3242]5
[3243]6
[3242]7namespace CHCDemoEngine
8{
9
[3243]10class ViewCellsTree;
11struct ViewCell;
12class Bvh;
13
14typedef std::vector<ViewCell *> ViewCellsContainer;
15
16
[3242]17/** Loads a preprocessed visibility solution.
18*/
19class VisibilitySolutionLoader
20{
21public:
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
28protected:
[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.