source: trunk/VUT/GtpVisibilityPreprocessor/src/Frustum.h @ 504

Revision 504, 914 bytes checked in by bittner, 19 years ago (diff)

added frustum class for frustum culling support for HW based rendering

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