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

Revision 383, 2.0 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
13class SceneGraphNode;
14class Mesh;
15class Intersectable;
16class MeshInstance;
17class Polygon3;
18class ViewCell;
19class BspTree;
20
21class X3dExporter : public Exporter
22{
23  std::ofstream stream;
24
25public:
26
27  X3dExporter(const string filename);
28
29  ~X3dExporter();
30
31
32  bool
33  ExportRays(const vector<Ray> &rays,
34             const float length=1000,
35             const RgbColor &color = RgbColor(1,1,1));
36
37  bool
38  ExportKdTree(const KdTree &tree);
39 
40  bool ExportBspTree(const BspTree &tree);
41
42  bool
43  ExportScene(SceneGraphNode *root)
44  {
45    ExportSceneNode(root);
46    return true;
47  }
48 
49  virtual void
50  ExportPolygon(Polygon3 *poly);
51
52  virtual void
53  ExportPolygons(const PolygonContainer &polys);
54
55  virtual bool
56  ExportBox(const AxisAlignedBox3 &box);
57
58  virtual void
59  ExportMeshInstance(MeshInstance *mi);
60
61  virtual void
62  ExportIntersectable(Intersectable *object);
63
64  virtual void
65  ExportMesh(Mesh *mesh);
66
67  virtual void
68  ExportViewCell(ViewCell *viewCell);
69
70  virtual void
71  ExportViewCells(const ViewCellContainer &viewCells);
72
73  virtual void
74  ExportBspSplitPlanes(const BspTree &tree);
75 
76  virtual void
77  ExportBspSplits(const BspTree &tree, const bool exportDepth);
78
79  virtual void
80  ExportLeavesGeometry(const BspTree &tree, const vector<BspLeaf *> &leaves);
81
82  bool
83  ExportRays(const RayContainer &rays,
84                         const float length=1000,
85                         const RgbColor &color = RgbColor(1,1,1));
86
87  virtual void
88  ExportBspViewCellPartition(const BspTree &tree, const int maxPvs = 0);
89
90  virtual void
91  ExportBspLeaves(const BspTree &tree);
92
93protected:
94
95  virtual void
96  ExportSceneNode(SceneGraphNode *node);
97
98  bool
99  ExportKdTreeRayDensity(const KdTree &tree);
100
101  bool
102  ExportBspTreeRayDensity(const BspTree &tree); 
103};
104 
105
106
107#endif
Note: See TracBrowser for help on using the repository browser.