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

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