Ocular Engine
MeshResourceSaver_PLY.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_GRAPHICS_MESH_RESOURCE_SAVER_PLY__H__
19 #define __H__OCULAR_GRAPHICS_MESH_RESOURCE_SAVER_PLY__H__
20 
21 #include "Graphics/Mesh/MeshSavers/MeshResourceSaver.hpp"
22 #include <fstream>
23 
24 //------------------------------------------------------------------------------------------
25 
30 namespace Ocular
31 {
36  namespace Graphics
37  {
38  class VertexBuffer;
39  class IndexBuffer;
40 
47  {
48  public:
49 
51  virtual ~MeshResourceSaver_PLY();
52 
53  protected:
54 
55  virtual bool saveFile(Core::File const& file, VertexBuffer const* vertexBuffer, IndexBuffer const* indexBuffer) override;
56 
57  bool validateGeometryCount(uint32_t numVertices, uint32_t numIndices, uint32_t numFaces) const;
58 
59  bool writeHeader(std::ofstream& stream, uint32_t numVertices, uint32_t numFaces) const;
60  bool writeBody(std::ofstream& stream, VertexBuffer const* vertexBuffer, IndexBuffer const* indexBuffer) const;
61 
62  private:
63  };
64  }
68 }
73 //------------------------------------------------------------------------------------------
74 
75 #endif
Definition: VertexBuffer.hpp:78
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: MeshResourceSaver.hpp:51
Definition: IndexBuffer.hpp:77
Definition: File.hpp:41
virtual bool saveFile(Core::File const &file, VertexBuffer const *vertexBuffer, IndexBuffer const *indexBuffer) override
Definition: MeshResourceSaver_PLY.cpp:52
Definition: MeshResourceSaver_PLY.hpp:46