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

Revision 242, 1.5 KB checked in by mattausch, 19 years ago (diff)

added output functions and castray method for bsp viewcells

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
10class KdTree;
11class BspTree;
12class SceneGraphNode;
13class Ray;
14class AxisAlignedBox3;
15class Intersectable;
16
17class Exporter
18{
19protected:
20  string mFilename;
21  bool mWireframe;
22  bool mUseForcedMaterial;
23  Material mForcedMaterial;
24
25  bool mExportRayDensity;
26 
27public:
28 
29  Exporter(const string filename):mFilename(filename),
30                                  mWireframe(false),
31                                  mUseForcedMaterial(false),
32                                  mExportRayDensity(false)
33  {
34  }
35  virtual ~Exporter() {}
36 
37  virtual bool ExportScene(SceneGraphNode *node) = 0;
38
39  virtual bool
40  ExportBox(const AxisAlignedBox3 &box) = 0;
41
42  virtual bool
43  ExportKdTree(const KdTree &tree) = 0;
44
45  virtual bool
46  ExportBspTree(const BspTree &tree) = 0;
47
48  virtual bool
49  ExportRays(const vector<Ray> &rays,
50             const float length=1000,
51             const RgbColor &color = RgbColor(1,1,1)
52             ) = 0;
53 
54
55  virtual void
56  ExportIntersectable(Intersectable *object) = 0;
57
58  void SetExportRayDensity(const bool d) { mExportRayDensity = d; }
59 
60  void SetWireframe() { mWireframe = true; }
61  void SetFilled() { mWireframe = false; }
62
63  void SetForcedMaterial(const Material &m) {
64    mForcedMaterial = m;
65    mUseForcedMaterial = true;
66  }
67  void ResetForcedMaterial() {
68    mUseForcedMaterial = false;
69  }
70   
71  static Exporter *
72  GetExporter(const string filename);
73
74 
75};
76 
77
78
79#endif
Note: See TracBrowser for help on using the repository browser.