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

Revision 434, 2.7 KB checked in by bittner, 19 years ago (diff)

vssbsp merge, tab change

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  ExportVspKdTree(const VspKdTree &tree, const int maxPvs = 0) = 0;
56
57  virtual bool
58  ExportBspTree(const BspTree &tree) = 0;
59
60//    virtual bool
61//    ExportRays(const vector<Ray> &rays,
62//           const float length=1000,
63//           const RgbColor &color = RgbColor(1,1,1)
64//           ) = 0;
65 
66  virtual bool
67  ExportRays(const RayContainer &rays,
68                                                 const float length=1000,
69                                                 const RgbColor &color = RgbColor(1,1,1)
70                                                 ) = 0;
71
72        virtual bool
73  ExportRays(const VssRayContainer &rays,
74                                                 const RgbColor &color = RgbColor(1,1,1)
75                                                 ) = 0;
76
77  virtual void
78  ExportViewCells(const ViewCellContainer &viewCells) = 0;
79  virtual void
80  ExportViewCell(ViewCell *viewCell) = 0;
81  virtual void
82  ExportIntersectable(Intersectable *object) = 0;
83
84  virtual void
85  ExportBspSplitPlanes(const BspTree &tree) = 0;
86  virtual void
87  ExportBspSplits(const BspTree &tree, const bool exportDepth = false) = 0;
88  virtual void
89  ExportLeavesGeometry(const BspTree &tree, const vector<BspLeaf *> &leaves) = 0;
90       
91  virtual void
92  ExportPolygons(const PolygonContainer &polys) = 0;
93
94  virtual void
95  ExportBspViewCellPartition(const BspTree &tree, const int maxPvs = 0) = 0;
96
97  virtual void
98  ExportBspLeaves(const BspTree &tree, const int maxPvs = 0) = 0;
99
100  void SetExportRayDensity(const bool d) { mExportRayDensity = d; }
101 
102  void SetWireframe() { mWireframe = true; }
103  void SetFilled() { mWireframe = false; }
104
105  void SetForcedMaterial(const Material &m) {
106    mForcedMaterial = m;
107    mUseForcedMaterial = true;
108  }
109  void ResetForcedMaterial() {
110    mUseForcedMaterial = false;
111  }
112   
113  static Exporter *
114  GetExporter(const string filename);
115
116};
117 
118
119
120#endif
Note: See TracBrowser for help on using the repository browser.