1
Fork 0
raytracer/include/image.h
2022-08-16 07:41:12 -04:00

21 lines
399 B
C++

#pragma once
#include <array>
#include <glm/glm.hpp>
template<class T, int Width, int Height> class Image {
public:
void reset() {
array = {};
}
T& get(const int32_t x, const int32_t y) {
return array[y * Width + x];
}
T get(const int32_t x, const int32_t y) const {
return array[y * Width + x];
}
std::array<T, Width* Height> array = {};
};