mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-27 18:48:36 +02:00
38 lines
1.4 KiB
C++
38 lines
1.4 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* SceneParser.hpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: TheRed <TheRed@students.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2024/12/26 21:37:37 by TheRed #+# #+# */
|
|
/* Updated: 2025/01/21 15:15:13 by tomoron ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef RT_SCENEPARSER__HPP
|
|
# define RT_SCENEPARSER__HPP
|
|
|
|
# include "RT.hpp"
|
|
|
|
class SceneParser
|
|
{
|
|
public:
|
|
SceneParser(Scene *scene, char *filename);
|
|
|
|
bool parseLine(const std::string &line);
|
|
|
|
private:
|
|
void parseMaterial(std::stringstream &line);
|
|
void parseTexture(std::stringstream &line);
|
|
void parseCamera(std::stringstream &line);
|
|
void parseObj(std::stringstream &line);
|
|
|
|
Scene *_scene;
|
|
std::string _filename;
|
|
|
|
std::map<std::string, std::function<Object *(std::stringstream &)>> object_parsers;
|
|
};
|
|
|
|
#endif
|