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

Revision 2124, 2.4 KB checked in by mattausch, 17 years ago (diff)
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{
[2124]31        std::ofstream stream;
[162]32
33public:
34
[2124]35        X3dExporter(const string filename);
[162]36
[2124]37        ~X3dExporter();
[162]38
[2124]39        bool
40                ExportKdTree(const KdTree &tree, const bool exportGeometry = false);
[162]41
[2124]42        bool
43                ExportVssTree(const VssTree &tree);
[162]44
[2124]45        bool
46                ExportVssTree2(const VssTree &tree,
47                const Vector3 direction);
[446]48
[2124]49        virtual bool
50                ExportRssTree2(const RssTree &tree,
51                const Vector3 direction);
[434]52
[2124]53        bool ExportBspTree(const BspTree &tree);
[434]54
[2124]55        bool
56                ExportScene(SceneGraphNode *root)
57        {
58                ExportSceneNode(root);
59                return true;
60        }
[446]61
[2124]62        virtual void
63                ExportPolygon(Polygon3 *poly);
[1106]64
[2124]65        virtual void
66                ExportPolygons(const PolygonContainer &polys);
[1106]67
[2124]68        virtual bool
69                ExportBox(const AxisAlignedBox3 &box);
[242]70
[2124]71        virtual void
72                ExportMesh(Mesh *mesh);
[462]73
[2124]74        virtual void
75                ExportViewCell(ViewCell *viewCell);
[242]76
[2124]77        bool
78                ExportRays(const RayContainer &rays,
79                const float length=1000,
80                const RgbColor &color = RgbColor(1,1,1));
[263]81
[2124]82        bool
83                ExportRays(const VssRayContainer &rays,
84                const RgbColor &color = RgbColor(1,1,1));
[162]85
[2124]86        virtual void
87                ExportBspSplitPlanes(const BspTree &tree);
[162]88
[2124]89        virtual void
90                ExportBspSplits(const BspTree &tree, const bool exportDepth);
[176]91
[2124]92        virtual void
93                ExportLeavesGeometry(const BspTree &tree, const vector<BspLeaf *> &leaves);
[1344]94
[2124]95        virtual void ExportBspLeaves(const BspTree &tree, const int maxPvs = 0);
[448]96
[2124]97        virtual void ExportBspSplits(const VspBspTree &tree, const bool exportDepth);
[462]98
[2124]99        virtual void ExportBeam(const Beam &beam, const AxisAlignedBox3 &box);
[312]100
[2124]101        bool ExportRaySets(const vector<VssRayContainer> &rays,
102                                           const RgbColor &color);
[360]103
[373]104
[162]105protected:
[329]106
[2124]107        virtual void ExportSceneNode(SceneGraphNode *node);
[162]108
[2124]109        bool ExportKdTreeRayDensity(const KdTree &tree);
[191]110
[2124]111        bool ExportBspTreeRayDensity(const BspTree &tree);
[462]112
[2124]113        void ExportBspNodeSplits(BspNode *root,
114                                                         const AxisAlignedBox3 &box,
115                                                         const bool exportDepth,
116                                                         const bool epsilon);
[459]117
[2124]118        void ExportViewpoint(const Vector3 &point, const Vector3 &direction);
[162]119};
120
[863]121};
[162]122
123#endif
Note: See TracBrowser for help on using the repository browser.