14 #include <unordered_map>
31 std::string materialFile =
"";
34 int getTokens(
const std::string& input,
const char sep,
35 std::vector<std::string>& tokens);
38 bool onlyTriangles =
true;
41 std::vector<std::vector<float> > vertices;
42 std::vector<std::vector<uint32_t> > facesVertexIndices;
43 std::vector<std::vector<float> > normals;
44 std::vector<std::vector<uint32_t> > facesNormalIndices;
45 std::vector<std::vector<float> > textureCoords;
46 std::vector<std::vector<uint32_t> > textureCoordsIndices;
47 std::vector<std::string> objectNames;
48 std::unordered_map<std::string, size_t> objectStartFaceIdx;
50 void loadVertexData(std::vector<float>& vertexData);
51 void loadIndexData(std::vector<uint16_t>& indexData);
52 void loadNormalsData(std::vector<float>& normalsData,
const std::vector<float>& vertexData);
53 void loadTextureCoordsData(std::vector<float>& textureCoordsData,
const std::vector<float>& vertexData);
55 void loadMaterial(
const std::string& filePath,
const std::string& name);
61 void correctDataVectors();
83 void load(
Model& model,
const std::string& meshName)
override;