source: GTP/trunk/Lib/Vis/Preprocessing/src/X3dExporter.h @ 1006

Revision 1006, 3.0 KB checked in by mattausch, 18 years ago (diff)

started viewspace-objectspace subdivision
removed memory leaks

RevLine 
[162]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"
[261]11#include "Containers.h"
[386]12#include "VssRay.h"
[469]13#include "ViewCell.h"
[162]14
[860]15namespace GtpVisibilityPreprocessor {
16
[162]17class SceneGraphNode;
18class Mesh;
[176]19class Intersectable;
20class MeshInstance;
[242]21class Polygon3;
22class ViewCell;
23class BspTree;
[448]24class VspBspTree;
25class BspNode;
[469]26//class VspKdViewCell;
[535]27class Beam;
[162]28
29class X3dExporter : public Exporter
30{
31  std::ofstream stream;
32
33public:
34
35  X3dExporter(const string filename);
36
37  ~X3dExporter();
38
39
[386]40//    bool
41//    ExportRays(const vector<Ray> &rays,
42//           const float length=1000,
43//           const RgbColor &color = RgbColor(1,1,1));
[162]44
[446]45
[162]46  bool
47  ExportKdTree(const KdTree &tree);
[434]48
[438]49  bool
[434]50  ExportVssTree(const VssTree &tree);
51
[438]52  bool
53  ExportVssTree2(const VssTree &tree,
54                                 const Vector3 direction
55                                 );
[446]56
57  virtual bool
58  ExportRssTree2(const RssTree &tree,
59                                 const Vector3 direction
60                                 );
[1006]61#if VSP_OPS
[462]62  bool
[1006]63  ExportVspOspTree(const VspOspTree &tree, const int maxPvs);
64#endif
[242]65  bool ExportBspTree(const BspTree &tree);
66
[162]67  bool
[462]68  ExportScene(SceneGraphNode *root)
[162]69  {
70    ExportSceneNode(root);
71    return true;
72  }
[462]73
74  virtual void
[260]75  ExportPolygon(Polygon3 *poly);
[242]76
[462]77  virtual void
[362]78  ExportPolygons(const PolygonContainer &polys);
[263]79
[176]80  virtual bool
[162]81  ExportBox(const AxisAlignedBox3 &box);
82
83  virtual void
84  ExportMeshInstance(MeshInstance *mi);
85
[176]86  virtual void
[1001]87  ExportTransformedMeshInstance(TransformedMeshInstance *mi);
88
89  virtual void
[176]90  ExportIntersectable(Intersectable *object);
91
92  virtual void
[162]93  ExportMesh(Mesh *mesh);
94
[462]95  virtual void
[260]96  ExportViewCell(ViewCell *viewCell);
[176]97
[462]98  virtual void
[313]99  ExportViewCells(const ViewCellContainer &viewCells);
[312]100
[462]101  virtual void
[440]102  ExportGeometry(const ObjectContainer &objects);
103
[448]104  bool
105  ExportRays(const RayContainer &rays,
106                         const float length=1000,
107                         const RgbColor &color = RgbColor(1,1,1));
108  bool
109  ExportRays(const VssRayContainer &rays,
110                         const RgbColor &color = RgbColor(1,1,1));
111
[462]112  virtual void
[313]113  ExportBspSplitPlanes(const BspTree &tree);
[462]114
115  virtual void
[383]116  ExportBspSplits(const BspTree &tree, const bool exportDepth);
[312]117
[360]118  virtual void
119  ExportLeavesGeometry(const BspTree &tree, const vector<BspLeaf *> &leaves);
120
[373]121  virtual void
[396]122  ExportBspLeaves(const BspTree &tree, const int maxPvs = 0);
[373]123
[448]124
[462]125  virtual void
[448]126  ExportBspSplits(const VspBspTree &tree, const bool exportDepth);
127
[535]128  virtual void ExportBeam(const Beam &beam, const AxisAlignedBox3 &box);
129
[162]130protected:
[329]131
[448]132
[176]133  virtual void
[162]134  ExportSceneNode(SceneGraphNode *node);
135
[191]136  bool
137  ExportKdTreeRayDensity(const KdTree &tree);
138
[263]139  bool
[434]140  ExportBspTreeRayDensity(const BspTree &tree);
[462]141
[448]142  void ExportBspNodeSplits(BspNode *root,
[462]143                                                   const AxisAlignedBox3 &box,
[448]144                                                   const bool exportDepth,
[462]145                                                   const bool epsilon);
[459]146
147
148  void ExportViewpoint(const Vector3 &point, const Vector3 &direction);
149
[162]150};
151
[863]152};
[162]153
154#endif
Note: See TracBrowser for help on using the repository browser.