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

Revision 191, 1.4 KB checked in by bittner, 19 years ago (diff)

basic sampling strategies

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