add obj parser

This commit is contained in:
2025-01-13 18:09:25 +01:00
parent 0482f34ce5
commit 449f059a07
10 changed files with 10480 additions and 18 deletions

View File

@ -6,7 +6,7 @@
/* By: TheRed <TheRed@students.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/12/26 21:37:37 by TheRed #+# #+# */
/* Updated: 2024/12/26 21:37:37 by TheRed ### ########.fr */
/* Updated: 2025/01/13 17:39:22 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
@ -25,10 +25,14 @@ class SceneParser
private:
void parseMaterial(std::stringstream &line);
void parseCamera(std::stringstream &line);
void parseObj(std::stringstream &line);
glm::vec3 getVertex(std::stringstream &line);
Triangle *getFace(std::stringstream &line, std::vector<glm::vec3> &vertices);
long int getVertexIndex(std::stringstream &line, size_t size);
Scene *_scene;
std::map<std::string, std::function<Object *(std::stringstream &)>> object_parsers;
};
#endif
#endif