add GeneratorScript

This commit is contained in:
MihailRis
2024-08-14 17:12:12 +03:00
parent 6f5eb6be48
commit 95cf451cc8
12 changed files with 196 additions and 51 deletions
+34
View File
@@ -0,0 +1,34 @@
#pragma once
#include <vector>
#include <string>
#include "typedefs.hpp"
class Heightmap {
std::vector<float> buffer;
uint width, height;
public:
Heightmap(uint width, uint height)
: width(width), height(height) {
buffer.resize(width*height);
}
~Heightmap() = default;
uint getWidth() const {
return width;
}
uint getHeight() const {
return height;
}
float* getValues() {
return buffer.data();
}
const float* getValues() const {
return buffer.data();
}
};