Revision 313,
1.8 KB
checked in by mattausch, 19 years ago
(diff) |
bsp viewcells now work
|
Rev | Line | |
---|
[162] | 1 | #ifndef __EXPORTER_H
|
---|
| 2 | #define __EXPORTER_H
|
---|
| 3 |
|
---|
| 4 | #include <string>
|
---|
| 5 | #include <vector>
|
---|
| 6 | using namespace std;
|
---|
| 7 |
|
---|
[176] | 8 | #include "Material.h"
|
---|
[261] | 9 | #include "Containers.h"
|
---|
[176] | 10 |
|
---|
[162] | 11 | class KdTree;
|
---|
[242] | 12 | class BspTree;
|
---|
[162] | 13 | class SceneGraphNode;
|
---|
| 14 | class Ray;
|
---|
| 15 | class AxisAlignedBox3;
|
---|
[176] | 16 | class Intersectable;
|
---|
[162] | 17 |
|
---|
| 18 | class Exporter
|
---|
| 19 | {
|
---|
| 20 | protected:
|
---|
| 21 | string mFilename;
|
---|
[191] | 22 | bool mWireframe;
|
---|
[176] | 23 | bool mUseForcedMaterial;
|
---|
| 24 | Material mForcedMaterial;
|
---|
[162] | 25 |
|
---|
[191] | 26 | bool mExportRayDensity;
|
---|
| 27 |
|
---|
[162] | 28 | public:
|
---|
| 29 |
|
---|
[176] | 30 | Exporter(const string filename):mFilename(filename),
|
---|
[191] | 31 | mWireframe(false),
|
---|
| 32 | mUseForcedMaterial(false),
|
---|
| 33 | mExportRayDensity(false)
|
---|
[162] | 34 | {
|
---|
| 35 | }
|
---|
[170] | 36 | virtual ~Exporter() {}
|
---|
[162] | 37 |
|
---|
| 38 | virtual bool ExportScene(SceneGraphNode *node) = 0;
|
---|
| 39 |
|
---|
| 40 | virtual bool
|
---|
| 41 | ExportBox(const AxisAlignedBox3 &box) = 0;
|
---|
| 42 |
|
---|
| 43 | virtual bool
|
---|
| 44 | ExportKdTree(const KdTree &tree) = 0;
|
---|
| 45 |
|
---|
| 46 | virtual bool
|
---|
[242] | 47 | ExportBspTree(const BspTree &tree) = 0;
|
---|
| 48 |
|
---|
| 49 | virtual bool
|
---|
[176] | 50 | ExportRays(const vector<Ray> &rays,
|
---|
| 51 | const float length=1000,
|
---|
| 52 | const RgbColor &color = RgbColor(1,1,1)
|
---|
| 53 | ) = 0;
|
---|
| 54 |
|
---|
[162] | 55 |
|
---|
[261] | 56 | virtual void
|
---|
[313] | 57 | ExportViewCells(const ViewCellContainer &viewCells) = 0;
|
---|
[312] | 58 | virtual void
|
---|
| 59 | ExportViewCell(ViewCell *viewCell) = 0;
|
---|
[162] | 60 | virtual void
|
---|
[176] | 61 | ExportIntersectable(Intersectable *object) = 0;
|
---|
| 62 |
|
---|
[313] | 63 | virtual void
|
---|
| 64 | ExportBspSplitPlanes(const BspTree &tree) = 0;
|
---|
| 65 | virtual void
|
---|
| 66 | ExportBspSplits(const BspTree &tree) = 0;
|
---|
| 67 |
|
---|
[191] | 68 | void SetExportRayDensity(const bool d) { mExportRayDensity = d; }
|
---|
| 69 |
|
---|
| 70 | void SetWireframe() { mWireframe = true; }
|
---|
| 71 | void SetFilled() { mWireframe = false; }
|
---|
[162] | 72 |
|
---|
[176] | 73 | void SetForcedMaterial(const Material &m) {
|
---|
| 74 | mForcedMaterial = m;
|
---|
| 75 | mUseForcedMaterial = true;
|
---|
| 76 | }
|
---|
| 77 | void ResetForcedMaterial() {
|
---|
| 78 | mUseForcedMaterial = false;
|
---|
| 79 | }
|
---|
| 80 |
|
---|
[162] | 81 | static Exporter *
|
---|
| 82 | GetExporter(const string filename);
|
---|
| 83 |
|
---|
[170] | 84 |
|
---|
[162] | 85 | };
|
---|
| 86 |
|
---|
| 87 |
|
---|
| 88 |
|
---|
| 89 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.