Revision 507,
1.0 KB
checked in by bittner, 19 years ago
(diff) |
Preparation for hw based sampling
|
-
Property svn:executable set to
*
|
Rev | Line | |
---|
[505] | 1 | #ifndef __BEAM_H
|
---|
| 2 | #define __BEAM_H
|
---|
[504] | 3 |
|
---|
| 4 | #include <vector>
|
---|
| 5 | using namespace std;
|
---|
| 6 |
|
---|
| 7 | class KdNode;
|
---|
| 8 | class Intersectable;
|
---|
| 9 | #include "AxisAlignedBox3.h"
|
---|
| 10 |
|
---|
[505] | 11 | class Beam {
|
---|
[504] | 12 |
|
---|
| 13 | public:
|
---|
[507] | 14 | enum {STORE_KD_NODES=1, STORE_OBJECTS=2, VALID=4};
|
---|
[504] | 15 | int mFlags;
|
---|
| 16 |
|
---|
| 17 | // list of nodes intersected by the frustum
|
---|
| 18 | vector<KdNode *> mKdNodes;
|
---|
[507] | 19 | // lits of objects intersected by the frustum
|
---|
[504] | 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;
|
---|
[507] | 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)
|
---|
[504] | 34 | {
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | void Construct(const AxisAlignedBox3 &box,
|
---|
| 38 | const AxisAlignedBox3 &dBox);
|
---|
| 39 |
|
---|
[507] | 40 |
|
---|
[504] | 41 | int
|
---|
| 42 | ComputeIntersection(const AxisAlignedBox3 &box);
|
---|
| 43 |
|
---|
| 44 |
|
---|
| 45 | };
|
---|
| 46 |
|
---|
| 47 |
|
---|
| 48 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.