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

Revision 3279, 948 bytes checked in by mattausch, 15 years ago (diff)

problems with reimporting of my exported scenes

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, Bvh *bvh, float viewCellsScaleFactor = 1.0f);
27
28
29protected:
30        /** Creates list of bvh nodes where the index
31                is equivalent to the id of this node in the bvh.
32        */
33        bool CreateIdSortedList(Bvh *bvh, BvhNodeContainer &nodes);
34
35        bool CreateIdSortedList2(BvhNode *n, BvhNodeContainer &nodes);
36
37
38        bool LoadPvs(FILE *fw, Bvh *bvh);
39
40        void AllocateLeafViewCells(ViewCellsTree *viewCellsTree);
41
42
43        ///////////////
44
45        int mNumNodes;
46
47        ViewCellsContainer mViewCells;
48};
49
50}
51
52#endif
Note: See TracBrowser for help on using the repository browser.