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

Revision 379, 2.3 KB checked in by mattausch, 19 years ago (diff)

worked on pvs heuristics

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"
[176]10
[162]11class KdTree;
[242]12class BspTree;
[162]13class SceneGraphNode;
14class Ray;
15class AxisAlignedBox3;
[176]16class Intersectable;
[360]17class BspLeaf;
[362]18class Polygon3;
[162]19
20class Exporter
21{
22protected:
23  string mFilename;
[191]24  bool mWireframe;
[176]25  bool mUseForcedMaterial;
26  Material mForcedMaterial;
[162]27
[191]28  bool mExportRayDensity;
29 
[162]30public:
31 
[176]32  Exporter(const string filename):mFilename(filename),
[191]33                                  mWireframe(false),
34                                  mUseForcedMaterial(false),
35                                  mExportRayDensity(false)
[162]36  {
37  }
[170]38  virtual ~Exporter() {}
[162]39 
40  virtual bool ExportScene(SceneGraphNode *node) = 0;
41
42  virtual bool
43  ExportBox(const AxisAlignedBox3 &box) = 0;
44
45  virtual bool
46  ExportKdTree(const KdTree &tree) = 0;
47
48  virtual bool
[242]49  ExportBspTree(const BspTree &tree) = 0;
50
51  virtual bool
[176]52  ExportRays(const vector<Ray> &rays,
53             const float length=1000,
54             const RgbColor &color = RgbColor(1,1,1)
55             ) = 0;
56 
[349]57  virtual bool
58  ExportRays(const RayContainer &rays,
59             const float length=1000,
60             const RgbColor &color = RgbColor(1,1,1)
61             ) = 0;
[162]62
[261]63  virtual void
[313]64  ExportViewCells(const ViewCellContainer &viewCells) = 0;
[312]65  virtual void
66  ExportViewCell(ViewCell *viewCell) = 0;
[162]67  virtual void
[176]68  ExportIntersectable(Intersectable *object) = 0;
69
[313]70  virtual void
71  ExportBspSplitPlanes(const BspTree &tree) = 0;
72  virtual void
73  ExportBspSplits(const BspTree &tree) = 0;
[360]74  virtual void
75  ExportLeavesGeometry(const BspTree &tree, const vector<BspLeaf *> &leaves) = 0;
[313]76       
[362]77  virtual void
78  ExportPolygons(const PolygonContainer &polys) = 0;
79
[373]80  virtual void
[379]81  ExportBspViewCellPartition(const BspTree &tree, const int maxPvs = 0) = 0;
[373]82
83  virtual void
84  ExportBspLeaves(const BspTree &tree) = 0;
85
[191]86  void SetExportRayDensity(const bool d) { mExportRayDensity = d; }
87 
88  void SetWireframe() { mWireframe = true; }
89  void SetFilled() { mWireframe = false; }
[162]90
[176]91  void SetForcedMaterial(const Material &m) {
92    mForcedMaterial = m;
93    mUseForcedMaterial = true;
94  }
95  void ResetForcedMaterial() {
96    mUseForcedMaterial = false;
97  }
98   
[162]99  static Exporter *
100  GetExporter(const string filename);
101
[170]102 
[162]103};
104 
105
106
107#endif
Note: See TracBrowser for help on using the repository browser.