source: trunk/VUT/GtpVisibilityPreprocessor/src/Beam.h @ 507

Revision 507, 1.0 KB checked in by bittner, 19 years ago (diff)

Preparation for hw based sampling

  • Property svn:executable set to *
Line 
1#ifndef __BEAM_H
2#define __BEAM_H
3
4#include <vector>
5using namespace std;
6
7class KdNode;
8class Intersectable;
9#include "AxisAlignedBox3.h"
10
11class Beam {
12 
13public:                 
14  enum {STORE_KD_NODES=1, STORE_OBJECTS=2, VALID=4};
15  int mFlags;
16 
17  // list of nodes intersected by the frustum
18  vector<KdNode *> mKdNodes;
19  // lits of objects intersected by the frustum
20  vector<Intersectable *> mObjects;
21
22  // spatial box
23  AxisAlignedBox3 mBox;
24  // directional box (it is actually a 2D box - only x and y ranges are valid)
25  // directional parametrization according to VssRay::GetDirParametrization
26  AxisAlignedBox3 mDirBox;
27
28  vector<Plane3> mPlanes;
29
30  bool IsValid() { return mFlags & VALID; }
31  bool SetValid() { return mFlags |= VALID; }
32
33  Beam():mFlags(STORE_KD_NODES+STORE_OBJECTS),mKdNodes(0), mObjects(0)
34  {
35  }
36 
37  void Construct(const  AxisAlignedBox3 &box,
38                                 const  AxisAlignedBox3 &dBox);
39 
40 
41  int
42  ComputeIntersection(const  AxisAlignedBox3 &box);
43
44 
45};
46
47
48#endif
Note: See TracBrowser for help on using the repository browser.