aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/CSTLMeshWriter.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/CSTLMeshWriter.h')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/CSTLMeshWriter.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CSTLMeshWriter.h b/libraries/irrlicht-1.8/source/Irrlicht/CSTLMeshWriter.h
new file mode 100644
index 0000000..0b0b76d
--- /dev/null
+++ b/libraries/irrlicht-1.8/source/Irrlicht/CSTLMeshWriter.h
@@ -0,0 +1,55 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5#ifndef __IRR_STL_MESH_WRITER_H_INCLUDED__
6#define __IRR_STL_MESH_WRITER_H_INCLUDED__
7
8#include "IMeshWriter.h"
9#include "S3DVertex.h"
10#include "irrString.h"
11
12namespace irr
13{
14namespace scene
15{
16 class IMeshBuffer;
17 class ISceneManager;
18
19 //! class to write meshes, implementing a STL writer
20 class CSTLMeshWriter : public IMeshWriter
21 {
22 public:
23
24 CSTLMeshWriter(scene::ISceneManager* smgr);
25 virtual ~CSTLMeshWriter();
26
27 //! Returns the type of the mesh writer
28 virtual EMESH_WRITER_TYPE getType() const;
29
30 //! writes a mesh
31 virtual bool writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 flags=EMWF_NONE);
32
33 protected:
34 // write binary format
35 bool writeMeshBinary(io::IWriteFile* file, scene::IMesh* mesh, s32 flags);
36
37 // write text format
38 bool writeMeshASCII(io::IWriteFile* file, scene::IMesh* mesh, s32 flags);
39
40 // create vector output with line end into string
41 void getVectorAsStringLine(const core::vector3df& v,
42 core::stringc& s) const;
43
44 // write face information to file
45 void writeFace(io::IWriteFile* file, const core::vector3df& v1,
46 const core::vector3df& v2, const core::vector3df& v3);
47
48 scene::ISceneManager* SceneManager;
49 };
50
51} // end namespace
52} // end namespace
53
54#endif
55