ray-tracer-comp371/src/Output.h
2024-02-27 21:23:24 -05:00

37 lines
703 B
C++

#ifndef OUTPUT_H_
#define OUTPUT_H_
#include <Eigen/Core>
#include <string>
#include <vector>
using Eigen::Vector3f;
using std::string;
using std::vector;
class Output {
public:
Output(const Vector3f &bgc, string path, int w, int h)
: red(vector<float>(w * h, bgc.x())),
green(vector<float>(w * h, bgc.y())),
blue(vector<float>(w * h, bgc.z())), path(path), width(w), height(h) {}
void write();
private:
int width, height;
string path;
vector<float> red;
vector<float> green;
vector<float> blue;
public:
void r(int, float);
float r(int) const;
void g(int, float);
float g(int) const;
void b(int, float);
float b(int) const;
};
#endif // !OUTPUT_H_