mirror of
https://github.com/vonhyou/ray-tracer-comp371.git
synced 2025-06-08 07:22:01 +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 "../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() {}
|
||||
|
|
|
@ -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_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue