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

Revision 386, 2.1 KB checked in by bittner, 19 years ago (diff)

VssPreprocessor? updates - directional rays, x3dexporter updates - removed duplicated code for ray exports

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