mirror of
https://github.com/vonhyou/ray-tracer-comp371.git
synced 2025-06-08 07:22:01 +00:00
29 lines
997 B
C++
29 lines
997 B
C++
#ifndef PARSER_H_
|
|
#define PARSER_H_
|
|
|
|
#include "../external/json.hpp"
|
|
|
|
#include "Geometry.h"
|
|
#include "Light.h"
|
|
#include "Scene.h"
|
|
|
|
class Parser {
|
|
public:
|
|
static Geometry *getGeometry(const nlohmann::json &);
|
|
static Light *getLight(const nlohmann::json &);
|
|
static Scene *getScene(const nlohmann::json &);
|
|
|
|
private:
|
|
static PointLight *getPointLight(const nlohmann::json &, const Vector3f &,
|
|
const Vector3f &);
|
|
static AreaLight *getAreaLight(const nlohmann::json &, const Vector3f &,
|
|
const Vector3f &);
|
|
static Rectangle *getRectangle(const nlohmann::json &, float, float, float,
|
|
const Vector3f &, const Vector3f &,
|
|
const Vector3f &, float);
|
|
static Sphere *getSphere(const nlohmann::json &, float, float, float,
|
|
const Vector3f &, const Vector3f &, const Vector3f &,
|
|
float);
|
|
};
|
|
|
|
#endif // !PARSER_H_
|