CAssetManager.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <ionCore.h>
5 #include <ionFramework.h>
6 #include <ionGraphics.h>
7 #include <ionWindow.h>
8 #include <ionScene.h>
9 
10 
11 namespace ion
12 {
13 
14  class CAssetManager : public Singleton<CAssetManager>
15  {
16 
17  public:
18 
20 
22  CImage * LoadImage(string const & FileName);
27  string const & FileNameLeft,
28  string const & FileNameRight,
29  string const & FileNameUp,
30  string const & FileNameDown,
31  string const & FileNameFront,
32  string const & FileNameBack,
34  Scene::CSimpleMesh * LoadMesh(string const & FileName);
35  Scene::CSimpleMesh * LoadMeshMerged(string const & FileName);
36  vector<Scene::CSimpleMesh *> LoadMeshes(string const & FileName);
37 
38  void AddAssetPath(string const & Path);
39  void SetTexturePath(string const & Path);
40  void SetShaderPath(string const & Path);
41  void SetMeshPath(string const & Path);
42 
43  string ParseShaderSource(string const & FileName, string const & RelativeDirectory);
44 
45  protected:
46 
48 
49  vector<string> AssetPaths;
50  string TexturePath = "Textures/";
51  string ShaderPath = "Shaders/";
52  string MeshPath = "Meshes/";
53 
54  private:
55 
56  friend class Singleton<CAssetManager>;
58  {}
59 
60  };
61 
62 }
SharedPointer< Graphics::ITextureCubeMap > LoadCubeMapTexture(string const &FileNameLeft, string const &FileNameRight, string const &FileNameUp, string const &FileNameDown, string const &FileNameFront, string const &FileNameBack, Graphics::ITexture::EMipMaps const MipMaps=Graphics::ITexture::EMipMaps::True)
Definition: CAssetManager.cpp:352
Definition: CSimpleMesh.h:33
std::shared_ptr< T > SharedPointer
Definition: ionSmartPointer.h:22
CImage * LoadImage(string const &FileName)
Definition: CAssetManager.cpp:154
SharedPointer< Graphics::ITexture3D > Load3DTexture(const std::vector< std::string > &fileName, Graphics::ITexture::EMipMaps const MipMaps=Graphics::ITexture::EMipMaps::True)
Definition: CAssetManager.cpp:206
void Init(CGraphicsAPI *GraphicsAPI)
Definition: CAssetManager.cpp:78
Scene::CSimpleMesh * LoadMesh(string const &FileName)
Definition: CAssetManager.cpp:404
Wraps a pointer to a singleton object.
Definition: ionClass.h:123
void SetTexturePath(string const &Path)
Definition: CAssetManager.cpp:512
void SetShaderPath(string const &Path)
Definition: CAssetManager.cpp:517
SharedPointer< Graphics::IShaderProgram > LoadShader(string const &Name)
Definition: CAssetManager.cpp:81
SharedPointer< Graphics::ITexture2D > LoadTexture(string const &FileName, Graphics::ITexture::EMipMaps const MipMaps=Graphics::ITexture::EMipMaps::True)
Definition: CAssetManager.cpp:176
Definition: CCatmullRomAdvancedSplineInterpolator.h:7
string MeshPath
Definition: CAssetManager.h:52
EMipMaps
Definition: ITexture.h:57
string ShaderPath
Definition: CAssetManager.h:51
void SetMeshPath(string const &Path)
Definition: CAssetManager.cpp:522
SharedPointer< Graphics::ITexture2DArray > Load2DTextureArray(const std::vector< std::string > &fileName, Graphics::ITexture::EMipMaps const MipMaps=Graphics::ITexture::EMipMaps::True)
Definition: CAssetManager.cpp:279
vector< string > AssetPaths
Definition: CAssetManager.h:49
vector< Scene::CSimpleMesh * > LoadMeshes(string const &FileName)
Definition: CAssetManager.cpp:475
Base class for Singleton design pattern implementation.
Definition: ionClass.h:90
SingletonPointer< CGraphicsAPI > GraphicsAPI
Definition: CAssetManager.h:47
Definition: CImage.h:10
string TexturePath
Definition: CAssetManager.h:50
Scene::CSimpleMesh * LoadMeshMerged(string const &FileName)
Definition: CAssetManager.cpp:438
string ParseShaderSource(string const &FileName, string const &RelativeDirectory)
Definition: CAssetManager.cpp:9
Definition: CGraphicsAPI.h:54
void AddAssetPath(string const &Path)
Definition: CAssetManager.cpp:507
Definition: CAssetManager.h:14