00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef OST_GFX_COLLADA_EXPORTER_HH
00020 #define OST_GFX_COLLADA_EXPORTER_HH
00021
00022
00023
00024
00025
00026 #include <string>
00027 #include <fstream>
00028 #include <vector>
00029
00030 #include "module_config.hh"
00031 #include "exporter.hh"
00032
00033 namespace ost { namespace gfx {
00034
00035 class DLLEXPORT_OST_GFX ColladaExporter: public Exporter
00036 {
00037 public:
00038 ColladaExporter(const std::string& collada_file);
00039 virtual ~ColladaExporter();
00040
00041
00042 virtual void SceneStart(const Scene* scene);
00043 virtual void SceneEnd(const Scene* scene);
00044 virtual void NodeStart(const std::string& name, NodeType t);
00045 virtual void NodeEnd(const std::string& name);
00046 virtual void WriteVertexData(const float* v, const float* n, const float* c, const float* t,
00047 size_t stride, size_t count);
00048 virtual void WritePointData(const unsigned int* i, size_t count);
00049 virtual void WriteLineData(const unsigned int* ij, size_t count);
00050 virtual void WriteTriData(const unsigned int* ijk, size_t count);
00051 virtual void WriteQuadData(const unsigned int* ijkl, size_t count);
00052
00053 private:
00054 std::string file_;
00055 std::ofstream out_;
00056 std::vector<std::string> obj_;
00057 };
00058
00059 }}
00060
00061 #endif