Added bi-linear interpolation for getting Z coordinate at any location in the grid.

This commit is contained in:
2023-05-14 00:03:36 +03:00
parent 91d438353d
commit c05a6a1ad2
6 changed files with 66 additions and 3 deletions
+2
View File
@@ -9,6 +9,8 @@ namespace grbl {
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;