#ifndef __OBJ_EXPORTER_H #define __OBJ_EXPORTER_H #include using std::string; #include #include #include "Exporter.h" #include "Containers.h" #include "VssRay.h" #include "ViewCell.h" namespace GtpVisibilityPreprocessor { class SceneGraphNode; class Mesh; class Intersectable; class MeshInstance; class Polygon3; class ViewCell; class BspTree; class VspBspTree; class BspNode; class Beam; class OspTree; class ObjExporter : public Exporter { std::ofstream stream; int vertexIndex; public: ObjExporter(const string filename); ~ObjExporter(); bool ExportKdTree(const KdTree &tree, const bool exportGeometry = false) { return false; } bool ExportVssTree(const VssTree &tree) { return false; } bool ExportVssTree2(const VssTree &tree, const Vector3 direction ) { return false; } virtual bool ExportRssTree2(const RssTree &tree, const Vector3 direction ) { return false; } bool ExportBspTree(const BspTree &tree) { return false; } bool ExportScene(SceneGraphNode *root) { ExportSceneNode(root); return true; } virtual void ExportPolygon(Polygon3 *poly); virtual void ExportPolygons(const PolygonContainer &polys) {} virtual bool ExportBox(const AxisAlignedBox3 &box) { return false; } virtual void ExportMesh(Mesh *mesh); virtual void ExportViewCell(ViewCell *viewCell) {} bool ExportRays(const RayContainer &rays, const float length=1000, const RgbColor &color = RgbColor(1,1,1)) { return false; } bool ExportRays(const VssRayContainer &rays, const RgbColor &color = RgbColor(1,1,1)) { return false; } virtual bool ExportRaySets(const vector &rays, const RgbColor &color) { return false; } virtual void ExportBspSplitPlanes(const BspTree &tree) {} virtual void ExportBspSplits(const BspTree &tree, const bool exportDepth) {} virtual void ExportLeavesGeometry(const BspTree &tree, const vector &leaves) {} virtual void ExportBspLeaves(const BspTree &tree, const int maxPvs = 0) {} virtual void ExportBspSplits(const VspBspTree &tree, const bool exportDepth) {} virtual void ExportBeam(const Beam &beam, const AxisAlignedBox3 &box) {} protected: virtual void ExportSceneNode(SceneGraphNode *node); virtual void ExportViewpoint(const Vector3 &point, const Vector3 &direction) {} }; } #endif