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

Revision 176, 1.3 KB checked in by bittner, 19 years ago (diff)

cosine sampling bug fixed

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