add heightmap:resize(int, int, str)
This commit is contained in:
@@ -5,6 +5,12 @@
|
||||
|
||||
#include "typedefs.hpp"
|
||||
|
||||
enum class InterpolationType {
|
||||
NEAREST,
|
||||
LINEAR,
|
||||
CUBIC,
|
||||
};
|
||||
|
||||
class Heightmap {
|
||||
std::vector<float> buffer;
|
||||
uint width, height;
|
||||
@@ -14,8 +20,13 @@ public:
|
||||
buffer.resize(width*height);
|
||||
}
|
||||
|
||||
Heightmap(uint width, uint height, std::vector<float> buffer)
|
||||
: width(width), height(height), buffer(std::move(buffer)) {}
|
||||
|
||||
~Heightmap() = default;
|
||||
|
||||
void resize(uint width, uint height, InterpolationType interpolation);
|
||||
|
||||
uint getWidth() const {
|
||||
return width;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user