mirror of
https://github.com/vonhyou/ray-tracer-comp371.git
synced 2025-08-13 17:08:04 +00:00
clear rt class temp
This commit is contained in:
parent
630967a07f
commit
a6a1472a80
2 changed files with 2 additions and 17 deletions
|
@ -1,18 +1,6 @@
|
||||||
#include "RayTracer.h"
|
#include "RayTracer.h"
|
||||||
#include "../external/simpleppm.h"
|
#include "../external/simpleppm.h"
|
||||||
#include "Scene.h"
|
|
||||||
|
|
||||||
#include <vector>
|
RayTracer::RayTracer(const nlohmann::json &json) : json(json) {}
|
||||||
|
|
||||||
RayTracer::RayTracer(const nlohmann::json &json)
|
void RayTracer::run() {}
|
||||||
: json(json), scene(Scene(json["output"])) {}
|
|
||||||
|
|
||||||
void RayTracer::render() {
|
|
||||||
int width = scene.getWidth();
|
|
||||||
int height = scene.getHeight();
|
|
||||||
|
|
||||||
std::vector<double> buffer(3 * width * height);
|
|
||||||
save_ppm(scene.getName(), buffer, width, height);
|
|
||||||
}
|
|
||||||
|
|
||||||
void RayTracer::run() { render(); }
|
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
#define RAY_TRACER_H_
|
#define RAY_TRACER_H_
|
||||||
|
|
||||||
#include "../external/json.hpp"
|
#include "../external/json.hpp"
|
||||||
#include "Scene.h"
|
|
||||||
|
|
||||||
class RayTracer {
|
class RayTracer {
|
||||||
public:
|
public:
|
||||||
|
@ -10,9 +9,7 @@ public:
|
||||||
void run();
|
void run();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Scene scene;
|
|
||||||
nlohmann::json json;
|
nlohmann::json json;
|
||||||
void render();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // !RAY_TRACER_H_
|
#endif // !RAY_TRACER_H_
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue