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