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

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