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

Revision 379, 2.3 KB checked in by mattausch, 19 years ago (diff)

worked on pvs heuristics

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  virtual void
81  ExportBspViewCellPartition(const BspTree &tree, const int maxPvs = 0) = 0;
82
83  virtual void
84  ExportBspLeaves(const BspTree &tree) = 0;
85
86  void SetExportRayDensity(const bool d) { mExportRayDensity = d; }
87 
88  void SetWireframe() { mWireframe = true; }
89  void SetFilled() { mWireframe = false; }
90
91  void SetForcedMaterial(const Material &m) {
92    mForcedMaterial = m;
93    mUseForcedMaterial = true;
94  }
95  void ResetForcedMaterial() {
96    mUseForcedMaterial = false;
97  }
98   
99  static Exporter *
100  GetExporter(const string filename);
101
102 
103};
104 
105
106
107#endif
Note: See TracBrowser for help on using the repository browser.