1
Fork 0
raytracer/include/image.h
2020-05-13 17:19:21 -04:00

22 lines
412 B
C++

#pragma once
#include <glm/glm.hpp>
#include <array>
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 = {};
};