clear rt class temp

This commit is contained in:
Shuo Feng 2024-02-13 20:23:57 -05:00
parent 630967a07f
commit a6a1472a80
Signed by: sfeng
GPG key ID: 1E83AE6CD1C037B1
2 changed files with 2 additions and 17 deletions

View file

@ -1,18 +1,6 @@
#include "RayTracer.h"
#include "../external/simpleppm.h"
#include "Scene.h"
#include <vector>
RayTracer::RayTracer(const nlohmann::json &json) : json(json) {}
RayTracer::RayTracer(const nlohmann::json &json)
: 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(); }
void RayTracer::run() {}

View file

@ -2,7 +2,6 @@
#define RAY_TRACER_H_
#include "../external/json.hpp"
#include "Scene.h"
class RayTracer {
public:
@ -10,9 +9,7 @@ public:
void run();
private:
Scene scene;
nlohmann::json json;
void render();
};
#endif // !RAY_TRACER_H_