POVRayExporter.h

Go to the documentation of this file.
00001 /* $Id:$ */
00002 
00003 #ifndef __POVRAY_EXPORTER_H
00004 #define __POVRAY_EXPORTER_H
00005 
00006 /*
00007  * Writes scene graph structure to the POV-Ray's file format.
00008  */
00009 
00010 #include <esg/explorer/Exporter.h>
00011 #include <esg/geometry/Sphere.h>
00012 #include <esg/mesh/Mesh.h>
00013 #include <esg/visitor/MatVisitor.h>
00014 
00015 namespace esg {
00016 
00017 class POVRayExporter : public Exporter {
00018 protected:
00019     unsigned _oid;
00020     
00021 protected:
00022     void _write_mesh         (Mesh&,         int /* texture */);
00023     void _write_sphere       (const Sphere&, int /* texture */);
00024     void _write_texture      (MatVisitor&,   unsigned);
00025     void _write_light_source (Emittance&);
00026 
00027     virtual bool _process_leaf              (SceneGraphObject&);
00028     virtual void _accept_new_transformation (const Matrix4&) {}
00029 
00030 public:
00031     POVRayExporter (FILE   * f /* opened (!) file */,
00032                     bool     c /* wether to close file at the end */)
00033         : Exporter(f, c), _oid(0)
00034     {}
00035 };
00036     
00037 }; // namespace
00038 
00039 #endif // __POVRAY_EXPORTER_H

Generated on Wed Jun 28 12:24:28 2006 for esg by  doxygen 1.4.6