#ifndef __IRR_STL_MESH_WRITER_H_INCLUDED__
#define __IRR_STL_MESH_WRITER_H_INCLUDED__
#include "IMeshWriter.h"
#include "S3DVertex.h"
#include "irrString.h"
namespace irr
{
namespace scene
{
class IMeshBuffer;
class ISceneManager;
class CSTLMeshWriter : public IMeshWriter
{
public:
CSTLMeshWriter(scene::ISceneManager* smgr);
virtual ~CSTLMeshWriter();
virtual EMESH_WRITER_TYPE getType() const;
virtual bool writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 flags=EMWF_NONE);
protected:
bool writeMeshBinary(io::IWriteFile* file, scene::IMesh* mesh, s32 flags);
bool writeMeshASCII(io::IWriteFile* file, scene::IMesh* mesh, s32 flags);
void getVectorAsStringLine(const core::vector3df& v,
core::stringc& s) const;
void writeFace(io::IWriteFile* file, const core::vector3df& v1,
const core::vector3df& v2, const core::vector3df& v3);
scene::ISceneManager* SceneManager;
};
}
}
#endif