Ocular Engine
MeshResourceLoader.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_GRAPHICS_MESH_RESOURCE_LOADER__H__
19 #define __H__OCULAR_GRAPHICS_MESH_RESOURCE_LOADER__H__
20 
21 #include "Resources/ResourceLoader.hpp"
22 #include "Graphics/Mesh/Vertex.hpp"
23 
24 #include <vector>
25 
26 //------------------------------------------------------------------------------------------
27 
32 namespace Ocular
33 {
38  namespace Graphics
39  {
51  {
52  public:
53 
54  MeshResourceLoader(std::string const& extension);
55  virtual ~MeshResourceLoader();
56 
57  virtual bool loadResource(Core::Resource* &resource, Core::File const& file, std::string const& mappingName) override;
58 
59  protected:
60 
74  virtual bool readFile(Core::File const& file, std::vector<Graphics::Vertex>& vertices, std::vector<uint32_t>& indices, uint32_t& numVertices, uint32_t& numIndices, Math::Vector3f& min, Math::Vector3f& max) = 0;
75 
91  virtual bool createResource(Core::Resource* &resource, Core::File const& file, std::vector<Graphics::Vertex> const& vertices, std::vector<uint32_t> const& indices, uint32_t numVertices, uint32_t numIndices, Math::Vector3f const& min, Math::Vector3f const& max);
92 
93  private:
94  };
95  }
99 }
104 //------------------------------------------------------------------------------------------
105 
106 #endif
Definition: MeshResourceLoader.hpp:50
virtual bool loadResource(Core::Resource *&resource, Core::File const &file, std::string const &mappingName) override
Definition: MeshResourceLoader.cpp:50
Definition: ResourceLoader.hpp:55
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
virtual bool readFile(Core::File const &file, std::vector< Graphics::Vertex > &vertices, std::vector< uint32_t > &indices, uint32_t &numVertices, uint32_t &numIndices, Math::Vector3f &min, Math::Vector3f &max)=0
virtual bool createResource(Core::Resource *&resource, Core::File const &file, std::vector< Graphics::Vertex > const &vertices, std::vector< uint32_t > const &indices, uint32_t numVertices, uint32_t numIndices, Math::Vector3f const &min, Math::Vector3f const &max)
Definition: MeshResourceLoader.cpp:89
Definition: File.hpp:41
Definition: Resource.hpp:46