Revision 191,
1.4 KB
checked in by bittner, 19 years ago
(diff) |
basic sampling strategies
|
Line | |
---|
1 | #ifndef __EXPORTER_H
|
---|
2 | #define __EXPORTER_H
|
---|
3 |
|
---|
4 | #include <string>
|
---|
5 | #include <vector>
|
---|
6 | using namespace std;
|
---|
7 |
|
---|
8 | #include "Material.h"
|
---|
9 |
|
---|
10 | class KdTree;
|
---|
11 | class SceneGraphNode;
|
---|
12 | class Ray;
|
---|
13 | class AxisAlignedBox3;
|
---|
14 | class Intersectable;
|
---|
15 |
|
---|
16 | class Exporter
|
---|
17 | {
|
---|
18 | protected:
|
---|
19 | string mFilename;
|
---|
20 | bool mWireframe;
|
---|
21 | bool mUseForcedMaterial;
|
---|
22 | Material mForcedMaterial;
|
---|
23 |
|
---|
24 | bool mExportRayDensity;
|
---|
25 |
|
---|
26 | public:
|
---|
27 |
|
---|
28 | Exporter(const string filename):mFilename(filename),
|
---|
29 | mWireframe(false),
|
---|
30 | mUseForcedMaterial(false),
|
---|
31 | mExportRayDensity(false)
|
---|
32 | {
|
---|
33 | }
|
---|
34 | virtual ~Exporter() {}
|
---|
35 |
|
---|
36 | virtual bool ExportScene(SceneGraphNode *node) = 0;
|
---|
37 |
|
---|
38 | virtual bool
|
---|
39 | ExportBox(const AxisAlignedBox3 &box) = 0;
|
---|
40 |
|
---|
41 | virtual bool
|
---|
42 | ExportKdTree(const KdTree &tree) = 0;
|
---|
43 |
|
---|
44 | virtual bool
|
---|
45 | ExportRays(const vector<Ray> &rays,
|
---|
46 | const float length=1000,
|
---|
47 | const RgbColor &color = RgbColor(1,1,1)
|
---|
48 | ) = 0;
|
---|
49 |
|
---|
50 |
|
---|
51 | virtual void
|
---|
52 | ExportIntersectable(Intersectable *object) = 0;
|
---|
53 |
|
---|
54 | void SetExportRayDensity(const bool d) { mExportRayDensity = d; }
|
---|
55 |
|
---|
56 | void SetWireframe() { mWireframe = true; }
|
---|
57 | void SetFilled() { mWireframe = false; }
|
---|
58 |
|
---|
59 | void SetForcedMaterial(const Material &m) {
|
---|
60 | mForcedMaterial = m;
|
---|
61 | mUseForcedMaterial = true;
|
---|
62 | }
|
---|
63 | void ResetForcedMaterial() {
|
---|
64 | mUseForcedMaterial = false;
|
---|
65 | }
|
---|
66 |
|
---|
67 | static Exporter *
|
---|
68 | GetExporter(const string filename);
|
---|
69 |
|
---|
70 |
|
---|
71 | };
|
---|
72 |
|
---|
73 |
|
---|
74 |
|
---|
75 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.