1#ifndef GLK_ELEVATION_MAP_HPP
2#define GLK_ELEVATION_MAP_HPP
29 template <
typename Vector>
37 template <
typename Vector>
38 void set_elevation(
const std::vector<Vector>& cells,
int elevation_index,
const std::vector<std::uint64_t>& cell_indices,
bool average =
false);
45 template <
typename Vector>
46 void set_cmap(
const std::vector<Vector>& cells,
int cmap_index,
const std::vector<std::uint64_t>& cell_indices,
bool average =
false);
51 template <
int WindowSize = 3>
55 template <
int WindowSize = 3>
65 Eigen::Array<float, -1, -1, Eigen::RowMajor>
count_map;
67 Eigen::Array<float, -1, -1, Eigen::RowMajor>
color_map;
89 Eigen::Vector2f origin;
91 int num_indices_faces;
92 int num_indices_edges;
Definition drawable.hpp:12
~ElevationMap()
Destructor.
void draw(glk::GLSLShader &shader) const
Draw the elevation map.
ElevationMap(const ElevationMapBuilder &builder, const MeshRenderingOptions &options=MeshRenderingOptions())
Constructor.
GLSLShader is a wrapper for OpenGL shader programs.
Definition glsl_shader.hpp:49
Definition async_buffer_copy.hpp:6
Builder for an elevation map.
Definition elevation_map.hpp:13
double resolution
Definition elevation_map.hpp:59
ElevationMapBuilder(double resolution, const Eigen::Vector2i &size, const Eigen::Vector2f &origin)
Constructor.
double inv_resolution
Definition elevation_map.hpp:60
void set_cmap(const std::vector< Vector > &cells, int cmap_index, const std::vector< std::uint64_t > &cell_indices, bool average=false)
Set the color values for the given cells in the elevation map.
std::vector< std::uint64_t > calc_cell_indices(const std::vector< Vector > &cells) const
Calculate the cell indices for a given set of cells.
void calc_cmap_gradient()
Replace the color map with its gradient magnitude.
Eigen::Array< float, -1, -1, Eigen::RowMajor > color_map
Definition elevation_map.hpp:67
Eigen::Vector2i size
Definition elevation_map.hpp:62
~ElevationMapBuilder()
Destructor.
Eigen::Vector2f origin
Definition elevation_map.hpp:63
Eigen::Array< float, -1, -1, Eigen::RowMajor > count_map
Definition elevation_map.hpp:65
Eigen::Array< float, -1, -1, Eigen::RowMajor > elevation_map
Definition elevation_map.hpp:66
void set_elevation(const std::vector< Vector > &cells, int elevation_index, const std::vector< std::uint64_t > &cell_indices, bool average=false)
Set the elevation values for the given cells in the elevation map.
void filter_elevation_map(bool process_valid_cells=true)
Apply local averaging filter to the elevation (and color) map.
Options for rendering meshes.
Definition mesh_rendering_options.hpp:12