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

Revision 434, 2.3 KB checked in by bittner, 19 years ago (diff)

vssbsp merge, tab change

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