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

Revision 446, 2.9 KB checked in by bittner, 19 years ago (diff)

non-functional merged version

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