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

Revision 1344, 2.8 KB checked in by mattausch, 18 years ago (diff)

worked on triangle processing. logical units will be created by grouping objects
using their visibility definitions.

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;
[535]26class Beam;
[162]27
[1221]28
[162]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
[1197]47  ExportKdTree(const KdTree &tree, const bool exportGeometry = false);
[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                                 );
[1106]61
[1121]62  // bool ExportOspTree(const OspTree &tree);
[1106]63
[242]64  bool ExportBspTree(const BspTree &tree);
65
[162]66  bool
[462]67  ExportScene(SceneGraphNode *root)
[162]68  {
69    ExportSceneNode(root);
70    return true;
71  }
[462]72
73  virtual void
[260]74  ExportPolygon(Polygon3 *poly);
[242]75
[462]76  virtual void
[362]77  ExportPolygons(const PolygonContainer &polys);
[263]78
[176]79  virtual bool
[162]80  ExportBox(const AxisAlignedBox3 &box);
81
82  virtual void
83  ExportMesh(Mesh *mesh);
84
[462]85  virtual void
[260]86  ExportViewCell(ViewCell *viewCell);
[176]87
[462]88  virtual void
[440]89  ExportGeometry(const ObjectContainer &objects);
90
[448]91  bool
92  ExportRays(const RayContainer &rays,
93                         const float length=1000,
94                         const RgbColor &color = RgbColor(1,1,1));
[1344]95
[448]96  bool
97  ExportRays(const VssRayContainer &rays,
98                         const RgbColor &color = RgbColor(1,1,1));
99
[462]100  virtual void
[313]101  ExportBspSplitPlanes(const BspTree &tree);
[462]102
103  virtual void
[383]104  ExportBspSplits(const BspTree &tree, const bool exportDepth);
[312]105
[360]106  virtual void
107  ExportLeavesGeometry(const BspTree &tree, const vector<BspLeaf *> &leaves);
108
[373]109  virtual void
[396]110  ExportBspLeaves(const BspTree &tree, const int maxPvs = 0);
[373]111
[462]112  virtual void
[448]113  ExportBspSplits(const VspBspTree &tree, const bool exportDepth);
114
[535]115  virtual void ExportBeam(const Beam &beam, const AxisAlignedBox3 &box);
116
[1112]117  bool
118  ExportRaySets(const vector<VssRayContainer> &rays,
119                                const RgbColor &color);
120
[162]121protected:
[329]122
[176]123  virtual void
[162]124  ExportSceneNode(SceneGraphNode *node);
125
[191]126  bool
127  ExportKdTreeRayDensity(const KdTree &tree);
128
[263]129  bool
[434]130  ExportBspTreeRayDensity(const BspTree &tree);
[462]131
[448]132  void ExportBspNodeSplits(BspNode *root,
[462]133                                                   const AxisAlignedBox3 &box,
[448]134                                                   const bool exportDepth,
[462]135                                                   const bool epsilon);
[459]136
137
138  void ExportViewpoint(const Vector3 &point, const Vector3 &direction);
139
[162]140};
141
[863]142};
[162]143
144#endif
Note: See TracBrowser for help on using the repository browser.