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

Revision 466, 3.3 KB checked in by bittner, 19 years ago (diff)

changed the viewcellsmanager interface to use vssrays - some functionality like the bsp merging is now restricted

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#include "VssRay.h"
11
12class KdTree;
13class BspTree;
14class VspKdTree;
15class SceneGraphNode;
16class Ray;
17class AxisAlignedBox3;
18class Intersectable;
19class BspLeaf;
20class Polygon3;
21class VssTree;
22class VspBspTree;
23class RssTree;
24
25class Exporter
26{
27protected:
28  string mFilename;
29  bool mWireframe;
30  bool mUseForcedMaterial;
31  Material mForcedMaterial;
32
33  bool mExportRayDensity;
34 
35public:
36 
37  Exporter(const string filename):mFilename(filename),
38                                  mWireframe(false),
39                                  mUseForcedMaterial(false),
40                                  mExportRayDensity(false)
41  {
42  }
43  virtual ~Exporter() {}
44 
45  virtual bool ExportScene(SceneGraphNode *node) = 0;
46
47  virtual bool
48  ExportBox(const AxisAlignedBox3 &box) = 0;
49
50  virtual bool
51  ExportKdTree(const KdTree &tree) = 0;
52
53  virtual bool
54  ExportVssTree(const VssTree &tree) = 0;
55
56  virtual bool
57  ExportVssTree2(const VssTree &tree,
58                                 const Vector3 direction
59                                 ) = 0;
60
61  virtual bool
62  ExportVspKdTree(const VspKdTree &tree, const int maxPvs = 0) = 0;
63
64  virtual bool
65  ExportBspTree(const BspTree &tree) = 0;
66
67//    virtual bool
68//    ExportRays(const vector<Ray> &rays,
69//           const float length=1000,
70//           const RgbColor &color = RgbColor(1,1,1)
71//           ) = 0;
72 
73  virtual bool
74  ExportRays(const RayContainer &rays,
75                         const float length=1000,
76                         const RgbColor &color = RgbColor(1,1,1)
77                         ) = 0;
78 
79  virtual bool
80  ExportRays(const VssRayContainer &rays,
81                         const RgbColor &color = RgbColor(1,1,1)
82                         ) = 0;
83 
84  virtual void
85  ExportViewCells(const ViewCellContainer &viewCells) = 0;
86  virtual void
87  ExportViewCell(ViewCell *viewCell) = 0;
88  virtual void
89  ExportIntersectable(Intersectable *object) = 0;
90
91  virtual void
92  ExportBspSplitPlanes(const BspTree &tree) = 0;
93  virtual void
94  ExportBspSplits(const BspTree &tree, const bool exportDepth = false) = 0;
95
96  virtual void
97  ExportLeavesGeometry(const BspTree &tree, const vector<BspLeaf *> &leaves) = 0;
98 
99  virtual void
100  ExportBspSplits(const VspBspTree &tree, const bool exportDepth = false) = 0;
101
102  virtual void
103  ExportBspViewCellPartition(const VspBspTree &tree, const int maxPvs = 0) = 0;
104
105  virtual void
106  ExportPolygons(const PolygonContainer &polys) = 0;
107
108  virtual void
109  ExportBspViewCellPartition(const BspTree &tree, const int maxPvs = 0) = 0;
110
111  virtual void
112  ExportBspLeaves(const BspTree &tree, const int maxPvs = 0) = 0;
113
114  virtual void
115  ExportGeometry(const ObjectContainer &objects) = 0;
116
117  virtual bool
118  ExportRssTree2(const RssTree &tree,
119                                 const Vector3 direction) = 0;
120
121  virtual bool
122  ExportVspKdTreeViewCells(const VspKdTree &tree, const int maxPvs = 0) = 0;
123
124  void SetExportRayDensity(const bool d) { mExportRayDensity = d; }
125 
126  void SetWireframe() { mWireframe = true; }
127  void SetFilled() { mWireframe = false; }
128
129  void SetForcedMaterial(const Material &m) {
130    mForcedMaterial = m;
131    mUseForcedMaterial = true;
132  }
133  void ResetForcedMaterial() {
134    mUseForcedMaterial = false;
135  }
136   
137  static Exporter *
138  GetExporter(const string filename);
139
140  virtual void ExportViewpoint(const Vector3 &point, const Vector3 &direction) = 0;
141
142};
143 
144
145
146#endif
Note: See TracBrowser for help on using the repository browser.