b7b9fed0dd
Added checkbox to select whether to run autoleveled program or not. Heightmap can handle non integer from_x and to_x.
25 lines
562 B
C++
25 lines
562 B
C++
#pragma once
|
|
|
|
#include <cstddef>
|
|
#include <cmath>
|
|
#include <glm/vec3.hpp>
|
|
#include <vector>
|
|
|
|
namespace grbl {
|
|
|
|
bool float_equal(float a, float b);
|
|
|
|
struct heightmap {
|
|
static heightmap from_params(float from_x, float from_y, float to_x, float to_y, float resolution);
|
|
float get_z_at(float x, float y) const;
|
|
size_t index_from_coords(float x, float y) const;
|
|
|
|
float from_x, from_y;
|
|
float to_x, to_y;
|
|
float resolution;
|
|
size_t x_segments, y_segments;
|
|
std::vector<glm::vec3> vertices;
|
|
};
|
|
|
|
}
|