All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
CubeFaceFileNames.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "Helpers.h"
7 #include "TextureNameHelpers.h"
8 #include <string>
9 #include <vector>
10 
11 namespace Eegeo
12 {
13  namespace Helpers
14  {
16  {
17  std::string positiveXFileName;
18  std::string negativeXFileName;
19  std::string positiveYFileName;
20  std::string negativeYFileName;
21  std::string positiveZFileName;
22  std::string negativeZFileName;
23 
24  std::vector<std::string> ToVector() const
25  {
26  std::vector<std::string> result;
27  result.push_back(positiveXFileName);
28  result.push_back(negativeXFileName);
29  result.push_back(positiveYFileName);
30  result.push_back(negativeYFileName);
31  result.push_back(positiveZFileName);
32  result.push_back(negativeZFileName);
33  return result;
34  }
35  };
36 
38  {
39  public:
40 
41  CubeTextureName(const std::string& textureName);
42  CubeFaceFileNames GetCubeFaceFileNames() const;
43  bool IsSingleFileCubeMap() const;
44  std::string GetSingleFileCubeMapFileName() const;
45  const std::string& GetTextureName() const;
46 
47  static std::string GetCubeTextureNameForPlatform(const std::string& baseName, bool singleFileCubeMapAvailable);
48 
49  private:
50 
51  std::string m_textureName;
52 
53  static const std::string SingleFileCubeMapSuffix;
54  };
55 
56  void ParseToBuffers(Helpers::IFileIO& fileIO, const CubeTextureName& name, std::vector<const std::vector<Byte>*>& buffers);
57  }
58 }