source: obsolete/tags/VUT/0.4/GtpVisibilityPreprocessor/src/Exporter.h @ 362

Revision 362, 2.1 KB checked in by mattausch, 19 years ago (diff)

added post merging bsp view cells
fixed bug at per ray subdivision

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#include "Containers.h"
10
11class KdTree;
12class BspTree;
13class SceneGraphNode;
14class Ray;
15class AxisAlignedBox3;
16class Intersectable;
17class BspLeaf;
18class Polygon3;
19
20class Exporter
21{
22protected:
23  string mFilename;
24  bool mWireframe;
25  bool mUseForcedMaterial;
26  Material mForcedMaterial;
27
28  bool mExportRayDensity;
29 
30public:
31 
32  Exporter(const string filename):mFilename(filename),
33                                  mWireframe(false),
34                                  mUseForcedMaterial(false),
35                                  mExportRayDensity(false)
36  {
37  }
38  virtual ~Exporter() {}
39 
40  virtual bool ExportScene(SceneGraphNode *node) = 0;
41
42  virtual bool
43  ExportBox(const AxisAlignedBox3 &box) = 0;
44
45  virtual bool
46  ExportKdTree(const KdTree &tree) = 0;
47
48  virtual bool
49  ExportBspTree(const BspTree &tree) = 0;
50
51  virtual bool
52  ExportRays(const vector<Ray> &rays,
53             const float length=1000,
54             const RgbColor &color = RgbColor(1,1,1)
55             ) = 0;
56 
57  virtual bool
58  ExportRays(const RayContainer &rays,
59             const float length=1000,
60             const RgbColor &color = RgbColor(1,1,1)
61             ) = 0;
62
63  virtual void
64  ExportViewCells(const ViewCellContainer &viewCells) = 0;
65  virtual void
66  ExportViewCell(ViewCell *viewCell) = 0;
67  virtual void
68  ExportIntersectable(Intersectable *object) = 0;
69
70  virtual void
71  ExportBspSplitPlanes(const BspTree &tree) = 0;
72  virtual void
73  ExportBspSplits(const BspTree &tree) = 0;
74  virtual void
75  ExportLeavesGeometry(const BspTree &tree, const vector<BspLeaf *> &leaves) = 0;
76       
77  virtual void
78  ExportPolygons(const PolygonContainer &polys) = 0;
79
80  void SetExportRayDensity(const bool d) { mExportRayDensity = d; }
81 
82  void SetWireframe() { mWireframe = true; }
83  void SetFilled() { mWireframe = false; }
84
85  void SetForcedMaterial(const Material &m) {
86    mForcedMaterial = m;
87    mUseForcedMaterial = true;
88  }
89  void ResetForcedMaterial() {
90    mUseForcedMaterial = false;
91  }
92   
93  static Exporter *
94  GetExporter(const string filename);
95
96 
97};
98 
99
100
101#endif
Note: See TracBrowser for help on using the repository browser.