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

Revision 242, 1.2 KB checked in by mattausch, 19 years ago (diff)

added output functions and castray method for bsp viewcells

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
12class SceneGraphNode;
13class Mesh;
14class Intersectable;
15class MeshInstance;
16class Polygon3;
17class ViewCell;
18class BspTree;
19
20class X3dExporter : public Exporter
21{
22  std::ofstream stream;
23
24public:
25
26  X3dExporter(const string filename);
27
28  ~X3dExporter();
29
30
31  bool
32  ExportRays(const vector<Ray> &rays,
33             const float length=1000,
34             const RgbColor &color = RgbColor(1,1,1));
35
36  bool
37  ExportKdTree(const KdTree &tree);
38 
39  bool ExportBspTree(const BspTree &tree);
40
41  bool
42  ExportScene(SceneGraphNode *root)
43  {
44    ExportSceneNode(root);
45    return true;
46  }
47 
48  virtual void
49        ExportPolygon(Polygon3 *poly);
50
51  virtual bool
52  ExportBox(const AxisAlignedBox3 &box);
53
54  virtual void
55  ExportMeshInstance(MeshInstance *mi);
56
57  virtual void
58  ExportIntersectable(Intersectable *object);
59
60  virtual void
61  ExportMesh(Mesh *mesh);
62
63  virtual void ExportViewCell(ViewCell *viewCell);
64
65protected:
66  virtual void
67  ExportSceneNode(SceneGraphNode *node);
68
69  bool
70  ExportKdTreeRayDensity(const KdTree &tree);
71
72 
73};
74 
75
76
77#endif
Note: See TracBrowser for help on using the repository browser.