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

Revision 440, 2.5 KB checked in by mattausch, 19 years ago (diff)
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  bool
39  ExportKdTree(const KdTree &tree);
40
41  bool
42  ExportVssTree(const VssTree &tree);
43
44  bool
45  ExportVssTree2(const VssTree &tree,
46                                 const Vector3 direction
47                                 );
48 
49  bool
50  ExportVspKdTree(const VspKdTree &tree, const int maxPvs);
51
52  bool ExportBspTree(const BspTree &tree);
53
54  bool
55  ExportScene(SceneGraphNode *root)
56  {
57    ExportSceneNode(root);
58    return true;
59  }
60 
61  virtual void
62  ExportPolygon(Polygon3 *poly);
63
64  virtual void
65  ExportPolygons(const PolygonContainer &polys);
66
67  virtual bool
68  ExportBox(const AxisAlignedBox3 &box);
69
70  virtual void
71  ExportMeshInstance(MeshInstance *mi);
72
73  virtual void
74  ExportIntersectable(Intersectable *object);
75
76  virtual void
77  ExportMesh(Mesh *mesh);
78
79  virtual void
80  ExportViewCell(ViewCell *viewCell);
81
82  virtual void
83  ExportViewCells(const ViewCellContainer &viewCells);
84
85  virtual void
86  ExportGeometry(const ObjectContainer &objects);
87
88  virtual void
89  ExportBspSplitPlanes(const BspTree &tree);
90 
91  virtual void
92  ExportBspSplits(const BspTree &tree, const bool exportDepth);
93
94  virtual void
95  ExportLeavesGeometry(const BspTree &tree, const vector<BspLeaf *> &leaves);
96
97  bool
98  ExportRays(const RayContainer &rays,
99                                                 const float length=1000,
100                                                 const RgbColor &color = RgbColor(1,1,1));
101
102        bool
103        ExportRays(const VssRayContainer &rays,
104                                                 const RgbColor &color = RgbColor(1,1,1));
105               
106  virtual void
107  ExportBspViewCellPartition(const BspTree &tree, const int maxPvs = 0);
108
109  virtual void
110  ExportBspLeaves(const BspTree &tree, const int maxPvs = 0);
111
112protected:
113
114  virtual void
115  ExportSceneNode(SceneGraphNode *node);
116
117  bool
118  ExportKdTreeRayDensity(const KdTree &tree);
119
120  bool
121  ExportBspTreeRayDensity(const BspTree &tree);
122
123        void
124        AddBoxToMesh(const AxisAlignedBox3 &box,
125                                                         Mesh *mesh);
126               
127};
128 
129
130
131#endif
Note: See TracBrowser for help on using the repository browser.