source: GTP/trunk/Lib/Vis/Preprocessing/src/VrmlExporter.h @ 860

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