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

Revision 438, 2.8 KB checked in by bittner, 19 years ago (diff)

vss updates

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