source: branches/VUT/0.2/GtpVisibilityPreprocessor/src/Pvs.h @ 191

Revision 191, 768 bytes checked in by bittner, 19 years ago (diff)

basic sampling strategies

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