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

Revision 3285, 1.0 KB checked in by mattausch, 16 years ago (diff)

working on viz for submission

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