#ifndef RawModelAssimp_h__ #define RawModelAssimp_h__ #ifdef USING_ASSIMP_AS_IMPORTER #include #include #include #include #include #include #include #include #include #include "../Common.h" #include "../GLM.h" #include "../Core/ResourceManager.h" #include "Texture.h" #include "Skeleton.h" #define RawModel RawModelAssimp class RawModelAssimp : public Resource { friend class ResourceManager; protected: RawModelAssimp(std::string fileName); public: ~RawModelAssimp(); struct Vertex { glm::vec3 Position; glm::vec3 Normal; glm::vec3 Tangent; glm::vec3 BiNormal; glm::vec2 TextureCoords; glm::vec4 BoneIndices; glm::vec4 BoneWeights; }; struct MaterialGroup { float Shininess; float Transparency; std::string TexturePath; std::shared_ptr<::Texture> Texture; std::string NormalMapPath; std::shared_ptr<::Texture> NormalMap; std::string SpecularMapPath; std::shared_ptr<::Texture> SpecularMap; unsigned int StartIndex; unsigned int EndIndex; }; std::vector MaterialGroups; std::vector m_Vertices; std::vector m_Indices; Skeleton* m_Skeleton = nullptr; glm::mat4 m_Matrix; private: std::vector BoneIndices; std::vector BoneWeights; std::vector Normals; std::vector TangentNormals; std::vector BiTangentNormals; std::vector TextureCoords; void CreateSkeleton(std::vector> &boneInfo, std::map &boneNameMapping, aiNode* node, int parentID); }; #endif #endif