summaryrefslogtreecommitdiff
path: root/gfx/models/obj.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-04-14 17:45:31 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-04-14 17:45:31 +0100
commit66da4f83c1b5bb6f3ceda880820e01c2f8e23e43 (patch)
treea28addf0ca4533f2b0f7562e218bba6843432957 /gfx/models/obj.h
parentLoad all assets in red dir with asset factory (diff)
downloadilt-66da4f83c1b5bb6f3ceda880820e01c2f8e23e43.tar.bz2
ilt-66da4f83c1b5bb6f3ceda880820e01c2f8e23e43.tar.xz
ilt-66da4f83c1b5bb6f3ceda880820e01c2f8e23e43.zip
Remove the old .obj load, assets and supporting stuff
Diffstat (limited to 'gfx/models/obj.h')
-rw-r--r--gfx/models/obj.h38
1 files changed, 0 insertions, 38 deletions
diff --git a/gfx/models/obj.h b/gfx/models/obj.h
deleted file mode 100644
index e28f7de..0000000
--- a/gfx/models/obj.h
+++ /dev/null
@@ -1,38 +0,0 @@
-#pragma once
-
-#ifndef yyFlexLexer
-# define yyFlexLexer objbaseFlexLexer
-# include <FlexLexer.h>
-#endif
-#include <filesystem>
-#include <fstream>
-#include <glm/glm.hpp>
-#include <map>
-#include <memory>
-#include <vector>
-
-class Mesh;
-class Vertex;
-
-class ObjParser : yyFlexLexer {
-public:
- explicit ObjParser(const std::filesystem::path & fileName);
- explicit ObjParser(std::unique_ptr<std::istream> in);
-
- int yylex() override;
-
- std::vector<glm::vec4> vertices;
- std::vector<glm::vec3> texCoords;
- std::vector<glm::vec3> normals;
- using FaceElement = glm::vec<3, unsigned int>;
- using Face = std::vector<FaceElement>;
- using Faces = std::vector<Face>;
- using Object = std::pair<std::string, Faces>;
- std::vector<Object> objects;
- glm::length_t axis {0};
-
- using NamedMeshesData = std::map<std::string, std::pair<std::vector<Vertex>, std::vector<unsigned int>>>;
- [[nodiscard]] NamedMeshesData createMeshData() const;
- using NamedMeshes = std::map<std::string, std::shared_ptr<const Mesh>>;
- [[nodiscard]] NamedMeshes createMeshes() const;
-};