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

Revision 490, 3.1 KB checked in by mattausch, 19 years ago (diff)

added loading and storing rays capability

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