source: trunk/VUT/GtpVisibilityPreprocessor/src/X3dExporter.h @ 446

Revision 446, 2.6 KB checked in by bittner, 19 years ago (diff)

non-functional merged version

Line 
1#ifndef __X3DEXPORTER_H
2#define __X3DEXPORTER_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
14class SceneGraphNode;
15class Mesh;
16class Intersectable;
17class MeshInstance;
18class Polygon3;
19class ViewCell;
20class BspTree;
21
22class X3dExporter : public Exporter
23{
24  std::ofstream stream;
25
26public:
27
28  X3dExporter(const string filename);
29
30  ~X3dExporter();
31
32
33//    bool
34//    ExportRays(const vector<Ray> &rays,
35//           const float length=1000,
36//           const RgbColor &color = RgbColor(1,1,1));
37
38
39  bool
40  ExportKdTree(const KdTree &tree);
41
42  bool
43  ExportVssTree(const VssTree &tree);
44
45  bool
46  ExportVssTree2(const VssTree &tree,
47                                 const Vector3 direction
48                                 );
49
50  virtual bool
51  ExportRssTree2(const RssTree &tree,
52                                 const Vector3 direction
53                                 );
54
55  bool
56  ExportVspKdTree(const VspKdTree &tree, const int maxPvs);
57
58  bool ExportBspTree(const BspTree &tree);
59
60  bool
61  ExportScene(SceneGraphNode *root)
62  {
63    ExportSceneNode(root);
64    return true;
65  }
66 
67  virtual void
68  ExportPolygon(Polygon3 *poly);
69
70  virtual void
71  ExportPolygons(const PolygonContainer &polys);
72
73  virtual bool
74  ExportBox(const AxisAlignedBox3 &box);
75
76  virtual void
77  ExportMeshInstance(MeshInstance *mi);
78
79  virtual void
80  ExportIntersectable(Intersectable *object);
81
82  virtual void
83  ExportMesh(Mesh *mesh);
84
85  virtual void
86  ExportViewCell(ViewCell *viewCell);
87
88  virtual void
89  ExportViewCells(const ViewCellContainer &viewCells);
90
91  virtual void
92  ExportGeometry(const ObjectContainer &objects);
93
94  virtual void
95  ExportBspSplitPlanes(const BspTree &tree);
96 
97  virtual void
98  ExportBspSplits(const BspTree &tree, const bool exportDepth);
99
100  virtual void
101  ExportLeavesGeometry(const BspTree &tree, const vector<BspLeaf *> &leaves);
102
103  bool
104  ExportRays(const RayContainer &rays,
105                                                 const float length=1000,
106                                                 const RgbColor &color = RgbColor(1,1,1));
107
108        bool
109        ExportRays(const VssRayContainer &rays,
110                                                 const RgbColor &color = RgbColor(1,1,1));
111               
112  virtual void
113  ExportBspViewCellPartition(const BspTree &tree, const int maxPvs = 0);
114
115  virtual void
116  ExportBspLeaves(const BspTree &tree, const int maxPvs = 0);
117
118protected:
119
120  virtual void
121  ExportSceneNode(SceneGraphNode *node);
122
123  bool
124  ExportKdTreeRayDensity(const KdTree &tree);
125
126  bool
127  ExportBspTreeRayDensity(const BspTree &tree);
128
129        void
130        AddBoxToMesh(const AxisAlignedBox3 &box,
131                                                         Mesh *mesh);
132               
133};
134 
135
136
137#endif
Note: See TracBrowser for help on using the repository browser.