#pragma once #ifndef yyFlexLexer # define yyFlexLexer objbaseFlexLexer # include #endif #include #include #include #include #include #include class Mesh; class Vertex; class ObjParser : yyFlexLexer { public: explicit ObjParser(const std::filesystem::path & fileName); explicit ObjParser(std::unique_ptr in); int yylex() override; std::vector vertices; std::vector texCoords; std::vector normals; using FaceElement = glm::vec<3, unsigned int>; using Face = std::vector; using Faces = std::vector; using Object = std::pair; std::vector objects; glm::length_t axis {0}; using NamedMeshesData = std::map, std::vector>>; [[nodiscard]] NamedMeshesData createMeshData() const; using NamedMeshes = std::map>; [[nodiscard]] NamedMeshes createMeshes() const; };