source: trunk/VUT/GtpVisibilityPreprocessor/src/Exporter.h @ 313

Revision 313, 1.8 KB checked in by mattausch, 19 years ago (diff)

bsp viewcells now work

Line 
1#ifndef __EXPORTER_H
2#define __EXPORTER_H
3
4#include <string>
5#include <vector>
6using namespace std;
7
8#include "Material.h"
9#include "Containers.h"
10
11class KdTree;
12class BspTree;
13class SceneGraphNode;
14class Ray;
15class AxisAlignedBox3;
16class Intersectable;
17
18class Exporter
19{
20protected:
21  string mFilename;
22  bool mWireframe;
23  bool mUseForcedMaterial;
24  Material mForcedMaterial;
25
26  bool mExportRayDensity;
27 
28public:
29 
30  Exporter(const string filename):mFilename(filename),
31                                  mWireframe(false),
32                                  mUseForcedMaterial(false),
33                                  mExportRayDensity(false)
34  {
35  }
36  virtual ~Exporter() {}
37 
38  virtual bool ExportScene(SceneGraphNode *node) = 0;
39
40  virtual bool
41  ExportBox(const AxisAlignedBox3 &box) = 0;
42
43  virtual bool
44  ExportKdTree(const KdTree &tree) = 0;
45
46  virtual bool
47  ExportBspTree(const BspTree &tree) = 0;
48
49  virtual bool
50  ExportRays(const vector<Ray> &rays,
51             const float length=1000,
52             const RgbColor &color = RgbColor(1,1,1)
53             ) = 0;
54 
55
56  virtual void
57  ExportViewCells(const ViewCellContainer &viewCells) = 0;
58  virtual void
59  ExportViewCell(ViewCell *viewCell) = 0;
60  virtual void
61  ExportIntersectable(Intersectable *object) = 0;
62
63  virtual void
64  ExportBspSplitPlanes(const BspTree &tree) = 0;
65  virtual void
66  ExportBspSplits(const BspTree &tree) = 0;
67       
68  void SetExportRayDensity(const bool d) { mExportRayDensity = d; }
69 
70  void SetWireframe() { mWireframe = true; }
71  void SetFilled() { mWireframe = false; }
72
73  void SetForcedMaterial(const Material &m) {
74    mForcedMaterial = m;
75    mUseForcedMaterial = true;
76  }
77  void ResetForcedMaterial() {
78    mUseForcedMaterial = false;
79  }
80   
81  static Exporter *
82  GetExporter(const string filename);
83
84 
85};
86 
87
88
89#endif
Note: See TracBrowser for help on using the repository browser.