mirror of
https://github.com/vonhyou/ray-tracer-comp371.git
synced 2025-08-14 09:58:03 +00:00
design parser class
This commit is contained in:
parent
4912d6c1d3
commit
48f00d194f
1 changed files with 18 additions and 1 deletions
19
src/Parser.h
19
src/Parser.h
|
@ -1,6 +1,23 @@
|
||||||
#ifndef PARSER_H_
|
#ifndef PARSER_H_
|
||||||
#define PARSER_H_
|
#define PARSER_H_
|
||||||
|
|
||||||
class Parser {};
|
#include "../external/json.hpp"
|
||||||
|
|
||||||
|
#include "Geometry.h"
|
||||||
|
#include "Light.h"
|
||||||
|
#include "Scene.h"
|
||||||
|
|
||||||
|
class Parser {
|
||||||
|
public:
|
||||||
|
static Geometry *parseGeometry(const nlohmann::json &);
|
||||||
|
static Light *parseLight(const nlohmann::json &);
|
||||||
|
static Scene *parseScene(const nlohmann::json &);
|
||||||
|
|
||||||
|
private:
|
||||||
|
static PointLight *parsePointLight(const nlohmann::json &);
|
||||||
|
static AreaLight *parseAreaLight(const nlohmann::json &);
|
||||||
|
static Rectangle *parseRectangle(const nlohmann::json &);
|
||||||
|
static Sphere *parseSphere(const nlohmann::json &);
|
||||||
|
};
|
||||||
|
|
||||||
#endif // !PARSER_H_
|
#endif // !PARSER_H_
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue