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

Revision 418, 2.2 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  ExportVspKdTree(const VspKdTree &tree);
43
44  bool ExportBspTree(const BspTree &tree);
45
46  bool
47  ExportScene(SceneGraphNode *root)
48  {
49    ExportSceneNode(root);
50    return true;
51  }
52 
53  virtual void
54  ExportPolygon(Polygon3 *poly);
55
56  virtual void
57  ExportPolygons(const PolygonContainer &polys);
58
59  virtual bool
60  ExportBox(const AxisAlignedBox3 &box);
61
62  virtual void
63  ExportMeshInstance(MeshInstance *mi);
64
65  virtual void
66  ExportIntersectable(Intersectable *object);
67
68  virtual void
69  ExportMesh(Mesh *mesh);
70
71  virtual void
72  ExportViewCell(ViewCell *viewCell);
73
74  virtual void
75  ExportViewCells(const ViewCellContainer &viewCells);
76
77  virtual void
78  ExportBspSplitPlanes(const BspTree &tree);
79 
80  virtual void
81  ExportBspSplits(const BspTree &tree, const bool exportDepth);
82
83  virtual void
84  ExportLeavesGeometry(const BspTree &tree, const vector<BspLeaf *> &leaves);
85
86  bool
87  ExportRays(const RayContainer &rays,
88                                                 const float length=1000,
89                                                 const RgbColor &color = RgbColor(1,1,1));
90
91        bool
92        ExportRays(const VssRayContainer &rays,
93                                                 const RgbColor &color = RgbColor(1,1,1));
94               
95  virtual void
96  ExportBspViewCellPartition(const BspTree &tree, const int maxPvs = 0);
97
98  virtual void
99  ExportBspLeaves(const BspTree &tree, const int maxPvs = 0);
100
101protected:
102
103  virtual void
104  ExportSceneNode(SceneGraphNode *node);
105
106  bool
107  ExportKdTreeRayDensity(const KdTree &tree);
108
109  bool
110  ExportBspTreeRayDensity(const BspTree &tree); 
111};
112 
113
114
115#endif
Note: See TracBrowser for help on using the repository browser.