source: GTP/trunk/Lib/Vis/Preprocessing/src/ObjExporter.h @ 1694

Revision 1694, 2.5 KB checked in by bittner, 18 years ago (diff)

obj exporter, vienna.obj + kdf added

  • Property svn:executable set to *
Line 
1#ifndef __OBJ_EXPORTER_H
2#define __OBJ_EXPORTER_H
3
4
5#include <string>
6using std::string;
7
8#include <iostream>
9#include <fstream>
10
11#include "Exporter.h"
12#include "Containers.h"
13#include "VssRay.h"
14#include "ViewCell.h"
15
16namespace GtpVisibilityPreprocessor {
17
18class SceneGraphNode;
19class Mesh;
20class Intersectable;
21class MeshInstance;
22class Polygon3;
23class ViewCell;
24class BspTree;
25class VspBspTree;
26class BspNode;
27class Beam;
28class OspTree;
29
30
31
32class ObjExporter : public Exporter {
33
34  std::ofstream stream;
35  int vertexIndex;
36 
37public:
38
39  ObjExporter(const string filename);
40
41  ~ObjExporter();
42
43  bool
44  ExportKdTree(const KdTree &tree, const bool exportGeometry = false) {
45        return false;
46  }
47
48  bool
49  ExportVssTree(const VssTree &tree) {
50        return false;
51  }
52
53  bool
54  ExportVssTree2(const VssTree &tree,
55                                 const Vector3 direction
56                                 ) {
57        return false;
58  }
59       
60
61  virtual bool
62  ExportRssTree2(const RssTree &tree,
63                                 const Vector3 direction
64                                 ) {
65        return false;
66  }
67
68  bool ExportBspTree(const BspTree &tree) {
69        return false;
70  }
71
72  bool
73  ExportScene(SceneGraphNode *root)
74  {
75    ExportSceneNode(root);
76    return true;
77  }
78 
79  virtual void
80  ExportPolygon(Polygon3 *poly);
81       
82
83  virtual void
84  ExportPolygons(const PolygonContainer &polys) {}
85
86  virtual bool
87  ExportBox(const AxisAlignedBox3 &box) { return false; }
88
89  virtual void
90  ExportMesh(Mesh *mesh);
91
92  virtual void
93  ExportViewCell(ViewCell *viewCell) {}
94
95  bool
96  ExportRays(const RayContainer &rays,
97                         const float length=1000,
98                         const RgbColor &color = RgbColor(1,1,1)) { return false; }
99  bool
100  ExportRays(const VssRayContainer &rays,
101        const RgbColor &color = RgbColor(1,1,1)) { return false; }
102                         
103 
104  virtual bool
105  ExportRaySets(const vector<VssRayContainer> &rays,
106                                const RgbColor &color) { return false; }
107
108  virtual void
109  ExportBspSplitPlanes(const BspTree &tree) {}
110
111  virtual void
112  ExportBspSplits(const BspTree &tree, const bool exportDepth) {}
113
114  virtual void
115  ExportLeavesGeometry(const BspTree &tree, const vector<BspLeaf *> &leaves) {}
116
117  virtual void
118  ExportBspLeaves(const BspTree &tree, const int maxPvs = 0) {}
119
120
121  virtual void
122  ExportBspSplits(const VspBspTree &tree, const bool exportDepth) {}
123
124  virtual void ExportBeam(const Beam &beam, const AxisAlignedBox3 &box) {}
125
126protected:
127 
128  virtual void
129  ExportSceneNode(SceneGraphNode *node);
130 
131  virtual void ExportViewpoint(const Vector3 &point, const Vector3 &direction) {}
132 
133};
134
135}
136
137#endif
Note: See TracBrowser for help on using the repository browser.