source: GTP/trunk/Lib/Vis/Preprocessing/src/Exporter.h @ 863

Revision 863, 3.2 KB checked in by mattausch, 18 years ago (diff)

working on preprocessor integration
added iv stuff

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