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

Revision 261, 1.6 KB checked in by mattausch, 19 years ago (diff)

added viewcell loader

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(ViewCellContainer *viewCells) = 0;
58
59  virtual void
60  ExportIntersectable(Intersectable *object) = 0;
61
62  void SetExportRayDensity(const bool d) { mExportRayDensity = d; }
63 
64  void SetWireframe() { mWireframe = true; }
65  void SetFilled() { mWireframe = false; }
66
67  void SetForcedMaterial(const Material &m) {
68    mForcedMaterial = m;
69    mUseForcedMaterial = true;
70  }
71  void ResetForcedMaterial() {
72    mUseForcedMaterial = false;
73  }
74   
75  static Exporter *
76  GetExporter(const string filename);
77
78 
79};
80 
81
82
83#endif
Note: See TracBrowser for help on using the repository browser.