source: trunk/VUT/GtpVisibilityPreprocessor/src/Pvs.h @ 177

Revision 177, 707 bytes checked in by bittner, 19 years ago (diff)
Line 
1#ifndef __PVS_H
2#define __PVS_H
3
4#include <map>
5
6class KdNode;
7
8struct LtKdNode
9{
10  bool operator()(const KdNode *a,
11                  const KdNode *b) const
12  {
13    return a < b;
14  }
15 
16};
17
18struct KdPvsData {
19  int mVisibleSamples;
20  KdPvsData() {}
21  KdPvsData(const int samples):mVisibleSamples(samples) {}
22};
23
24typedef std::map<KdNode *, KdPvsData, LtKdNode> KdPvsMap;
25
26
27class KdPvs {
28public:
29  int mSamples;
30  KdPvsMap mEntries;
31  KdPvsData *Find(KdNode *node);
32  int AddNodeSample(KdNode *node);
33  int Compress() {return 0;}
34  int GetSize() { return mEntries.size(); }
35  void GetData(const int index,
36               KdNode *&node,
37               KdPvsData &data
38               );
39 
40};
41
42#endif
43
Note: See TracBrowser for help on using the repository browser.