#ifndef __EXPORTER_H #define __EXPORTER_H #include #include using namespace std; #include "Material.h" #include "Containers.h" class KdTree; class BspTree; class SceneGraphNode; class Ray; class AxisAlignedBox3; class Intersectable; class Exporter { protected: string mFilename; bool mWireframe; bool mUseForcedMaterial; Material mForcedMaterial; bool mExportRayDensity; public: Exporter(const string filename):mFilename(filename), mWireframe(false), mUseForcedMaterial(false), mExportRayDensity(false) { } virtual ~Exporter() {} virtual bool ExportScene(SceneGraphNode *node) = 0; virtual bool ExportBox(const AxisAlignedBox3 &box) = 0; virtual bool ExportKdTree(const KdTree &tree) = 0; virtual bool ExportBspTree(const BspTree &tree) = 0; virtual bool ExportRays(const vector &rays, const float length=1000, const RgbColor &color = RgbColor(1,1,1) ) = 0; virtual void ExportViewCells(ViewCellContainer *viewCells) = 0; virtual void ExportIntersectable(Intersectable *object) = 0; void SetExportRayDensity(const bool d) { mExportRayDensity = d; } void SetWireframe() { mWireframe = true; } void SetFilled() { mWireframe = false; } void SetForcedMaterial(const Material &m) { mForcedMaterial = m; mUseForcedMaterial = true; } void ResetForcedMaterial() { mUseForcedMaterial = false; } static Exporter * GetExporter(const string filename); }; #endif