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

Revision 1486, 2.8 KB checked in by mattausch, 18 years ago (diff)

worked on guided visibility sampling

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;
26class Beam;
27class OspTree;
28
29
30
31class VrmlExporter : public Exporter
32{
33  std::ofstream stream;
34
35public:
36
37  VrmlExporter(const string filename);
38
39  ~VrmlExporter();
40
41
42//    bool
43//    ExportRays(const vector<Ray> &rays,
44//           const float length=1000,
45//           const RgbColor &color = RgbColor(1,1,1));
46
47
48  bool
49  ExportKdTree(const KdTree &tree, const bool exportGeometry = false);
50
51  //bool ExportOspTree(const OspTree &tree);
52
53  bool
54  ExportVssTree(const VssTree &tree);
55
56  bool
57  ExportVssTree2(const VssTree &tree,
58                                 const Vector3 direction
59                                 );
60
61  virtual bool
62  ExportRssTree2(const RssTree &tree,
63                                 const Vector3 direction
64                                 );
65#if 0
66  bool
67  ExportVspOspTree(const VspKdTree &tree, const int maxPvs);
68#endif
69  bool ExportBspTree(const BspTree &tree);
70
71  bool
72  ExportScene(SceneGraphNode *root)
73  {
74    ExportSceneNode(root);
75    return true;
76  }
77
78  virtual void
79  ExportPolygon(Polygon3 *poly);
80
81  virtual void
82  ExportPolygons(const PolygonContainer &polys);
83
84  virtual bool
85  ExportBox(const AxisAlignedBox3 &box);
86
87  virtual void
88  ExportMesh(Mesh *mesh);
89
90  virtual void
91  ExportViewCell(ViewCell *viewCell);
92
93  bool
94  ExportRays(const RayContainer &rays,
95                         const float length=1000,
96                         const RgbColor &color = RgbColor(1,1,1));
97  bool
98  ExportRays(const VssRayContainer &rays,
99                         const RgbColor &color = RgbColor(1,1,1));
100
101  virtual bool
102  ExportRaySets(const vector<VssRayContainer> &rays,
103        const RgbColor &color) { return false; }
104
105  virtual void
106  ExportBspSplitPlanes(const BspTree &tree);
107
108  virtual void
109  ExportBspSplits(const BspTree &tree, const bool exportDepth);
110
111  virtual void
112  ExportLeavesGeometry(const BspTree &tree, const vector<BspLeaf *> &leaves);
113
114  virtual void
115  ExportBspLeaves(const BspTree &tree, const int maxPvs = 0);
116
117
118  virtual void
119  ExportBspSplits(const VspBspTree &tree, const bool exportDepth);
120
121  virtual void ExportBeam(const Beam &beam, const AxisAlignedBox3 &box);
122
123protected:
124
125
126  virtual void
127  ExportSceneNode(SceneGraphNode *node);
128
129  bool
130  ExportKdTreeRayDensity(const KdTree &tree);
131
132  bool
133  ExportBspTreeRayDensity(const BspTree &tree);
134
135  void ExportBspNodeSplits(BspNode *root,
136                                                   const AxisAlignedBox3 &box,
137                                                   const bool exportDepth,
138                                                   const bool epsilon);
139
140
141  void ExportViewpoint(const Vector3 &point, const Vector3 &direction);
142
143};
144
145}
146
147#endif
Note: See TracBrowser for help on using the repository browser.