|
32 | 32 |
|
33 | 33 |
|
34 | 34 | namespace kore {
|
35 |
| - class MeshLoader { |
36 |
| - public: |
37 |
| - static MeshLoader* getInstance(); |
38 |
| - ~MeshLoader(); |
| 35 | + class MeshLoader { |
| 36 | + public: |
| 37 | + static MeshLoader* getInstance(); |
| 38 | + virtual ~MeshLoader(); |
39 | 39 |
|
40 |
| - SceneNodePtr loadScene(const std::string& szScenePath, |
41 |
| - const bool bUseBuffers); |
42 |
| - MeshPtr loadSingleMesh(const std::string& szMeshPath, |
43 |
| - const bool bUseBuffers); |
| 40 | + SceneNodePtr loadScene(const std::string& szScenePath, |
| 41 | + const bool bUseBuffers); |
| 42 | + MeshPtr loadSingleMesh(const std::string& szMeshPath, |
| 43 | + const bool bUseBuffers); |
44 | 44 |
|
45 |
| - private: |
46 |
| - MeshLoader(); |
47 |
| - const aiScene* readScene(const std::string& szScenePath); |
| 45 | + kore::MeshPtr loadMesh(const aiScene* paiScene, |
| 46 | + const uint uMeshIdx, |
| 47 | + const bool bUseBuffers = true); |
48 | 48 |
|
49 |
| - void loadChildNode(const aiScene* paiScene, |
50 |
| - const aiNode* paiNode, |
51 |
| - SceneNodePtr& parentNode, |
52 |
| - const bool bUseBuffers); |
| 49 | + private: |
| 50 | + MeshLoader(); |
| 51 | + const aiScene* readScene(const std::string& szScenePath); |
53 | 52 |
|
54 |
| - kore::MeshPtr loadMesh(const aiScene* paiScene, |
55 |
| - const uint uMeshIdx, |
56 |
| - const bool bUseBuffers); |
| 53 | + void loadChildNode(const aiScene* paiScene, |
| 54 | + const aiNode* paiNode, |
| 55 | + SceneNodePtr& parentNode, |
| 56 | + const bool bUseBuffers); |
| 57 | + void loadVertexPositions(const aiMesh* pAiMesh, |
| 58 | + kore::MeshPtr& pMesh); |
57 | 59 |
|
58 |
| - void loadVertexPositions(const aiMesh* pAiMesh, |
59 |
| - kore::MeshPtr& pMesh); |
| 60 | + void loadVertexNormals(const aiMesh* pAiMesh, |
| 61 | + kore::MeshPtr& pMesh); |
60 | 62 |
|
61 |
| - void loadVertexNormals(const aiMesh* pAiMesh, |
62 |
| - kore::MeshPtr& pMesh); |
| 63 | + void loadVertexTangents(const aiMesh* pAiMesh, |
| 64 | + kore::MeshPtr& pMesh); |
63 | 65 |
|
64 |
| - void loadVertexTangents(const aiMesh* pAiMesh, |
65 |
| - kore::MeshPtr& pMesh); |
| 66 | + void loadFaceIndices(const aiMesh* pAiMesh, |
| 67 | + kore::MeshPtr& pMesh); |
66 | 68 |
|
67 |
| - void loadFaceIndices(const aiMesh* pAiMesh, |
68 |
| - kore::MeshPtr& pMesh); |
| 69 | + void loadVertexTextureCoords(const aiMesh* pAiMesh, |
| 70 | + kore::MeshPtr& pMesh, |
| 71 | + const unsigned int iUVset); |
69 | 72 |
|
70 |
| - void loadVertexTextureCoords(const aiMesh* pAiMesh, |
71 |
| - kore::MeshPtr& pMesh, |
72 |
| - const unsigned int iUVset); |
| 73 | + void loadVertexColors(const aiMesh* pAiMesh, |
| 74 | + kore::MeshPtr& pMesh, |
| 75 | + const unsigned int iColorSet); |
73 | 76 |
|
74 |
| - void loadVertexColors(const aiMesh* pAiMesh, |
75 |
| - kore::MeshPtr& pMesh, |
76 |
| - const unsigned int iColorSet); |
| 77 | + glm::mat4 glmMatFromAiMat(const aiMatrix4x4& aiMat); |
77 | 78 |
|
78 |
| - glm::mat4 glmMatFromAiMat(const aiMatrix4x4& aiMat); |
79 |
| - |
80 |
| - Assimp::Importer _aiImporter; |
81 |
| - }; |
82 |
| -} |
| 79 | + Assimp::Importer _aiImporter; |
| 80 | + }; |
| 81 | +}; |
83 | 82 | #endif // CORE_INCLUDE_CORE_MESHLOADER_H_
|
0 commit comments