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

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

added viewcell loader

RevLine 
[162]1#ifndef __EXPORTER_H
2#define __EXPORTER_H
3
4#include <string>
5#include <vector>
6using namespace std;
7
[176]8#include "Material.h"
[261]9#include "Containers.h"
[176]10
[162]11class KdTree;
[242]12class BspTree;
[162]13class SceneGraphNode;
14class Ray;
15class AxisAlignedBox3;
[176]16class Intersectable;
[162]17
18class Exporter
19{
20protected:
21  string mFilename;
[191]22  bool mWireframe;
[176]23  bool mUseForcedMaterial;
24  Material mForcedMaterial;
[162]25
[191]26  bool mExportRayDensity;
27 
[162]28public:
29 
[176]30  Exporter(const string filename):mFilename(filename),
[191]31                                  mWireframe(false),
32                                  mUseForcedMaterial(false),
33                                  mExportRayDensity(false)
[162]34  {
35  }
[170]36  virtual ~Exporter() {}
[162]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
[242]47  ExportBspTree(const BspTree &tree) = 0;
48
49  virtual bool
[176]50  ExportRays(const vector<Ray> &rays,
51             const float length=1000,
52             const RgbColor &color = RgbColor(1,1,1)
53             ) = 0;
54 
[162]55
[261]56  virtual void
57  ExportViewCells(ViewCellContainer *viewCells) = 0;
58
[162]59  virtual void
[176]60  ExportIntersectable(Intersectable *object) = 0;
61
[191]62  void SetExportRayDensity(const bool d) { mExportRayDensity = d; }
63 
64  void SetWireframe() { mWireframe = true; }
65  void SetFilled() { mWireframe = false; }
[162]66
[176]67  void SetForcedMaterial(const Material &m) {
68    mForcedMaterial = m;
69    mUseForcedMaterial = true;
70  }
71  void ResetForcedMaterial() {
72    mUseForcedMaterial = false;
73  }
74   
[162]75  static Exporter *
76  GetExporter(const string filename);
77
[170]78 
[162]79};
80 
81
82
83#endif
Note: See TracBrowser for help on using the repository browser.