Revision 176,
1.3 KB
checked in by bittner, 19 years ago
(diff) |
cosine sampling bug fixed
|
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"
|
---|
| 9 |
|
---|
[162] | 10 | class KdTree;
|
---|
| 11 | class SceneGraphNode;
|
---|
| 12 | class Ray;
|
---|
| 13 | class AxisAlignedBox3;
|
---|
[176] | 14 | class Intersectable;
|
---|
[162] | 15 |
|
---|
| 16 | class Exporter
|
---|
| 17 | {
|
---|
| 18 | protected:
|
---|
| 19 | string mFilename;
|
---|
| 20 | bool wireframe;
|
---|
[176] | 21 | bool mUseForcedMaterial;
|
---|
| 22 | Material mForcedMaterial;
|
---|
[162] | 23 |
|
---|
| 24 | public:
|
---|
| 25 |
|
---|
[176] | 26 | Exporter(const string filename):mFilename(filename),
|
---|
| 27 | wireframe(false),
|
---|
| 28 | mUseForcedMaterial(false)
|
---|
[162] | 29 | {
|
---|
| 30 | }
|
---|
[170] | 31 | virtual ~Exporter() {}
|
---|
[162] | 32 |
|
---|
| 33 | virtual bool ExportScene(SceneGraphNode *node) = 0;
|
---|
| 34 |
|
---|
| 35 | virtual bool
|
---|
| 36 | ExportBox(const AxisAlignedBox3 &box) = 0;
|
---|
| 37 |
|
---|
| 38 | virtual bool
|
---|
| 39 | ExportKdTree(const KdTree &tree) = 0;
|
---|
| 40 |
|
---|
| 41 | virtual bool
|
---|
[176] | 42 | ExportRays(const vector<Ray> &rays,
|
---|
| 43 | const float length=1000,
|
---|
| 44 | const RgbColor &color = RgbColor(1,1,1)
|
---|
| 45 | ) = 0;
|
---|
| 46 |
|
---|
[162] | 47 |
|
---|
| 48 | virtual void
|
---|
[176] | 49 | ExportIntersectable(Intersectable *object) = 0;
|
---|
| 50 |
|
---|
[165] | 51 | void SetWireframe() { wireframe = true; }
|
---|
| 52 | void SetFilled() { wireframe = false; }
|
---|
[162] | 53 |
|
---|
[176] | 54 | void SetForcedMaterial(const Material &m) {
|
---|
| 55 | mForcedMaterial = m;
|
---|
| 56 | mUseForcedMaterial = true;
|
---|
| 57 | }
|
---|
| 58 | void ResetForcedMaterial() {
|
---|
| 59 | mUseForcedMaterial = false;
|
---|
| 60 | }
|
---|
| 61 |
|
---|
[162] | 62 | static Exporter *
|
---|
| 63 | GetExporter(const string filename);
|
---|
| 64 |
|
---|
[170] | 65 |
|
---|
[162] | 66 | };
|
---|
| 67 |
|
---|
| 68 |
|
---|
| 69 |
|
---|
| 70 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.