HighMap library (C++)
Loading...
Searching...
No Matches
grids.hpp File Reference

Go to the source code of this file.

Classes

struct  hmap::neighborhood::Neighbor
struct  hmap::neighborhood::NeighborWeighted

Namespaces

namespace  hmap
namespace  hmap::neighborhood

Functions

int hmap::convert_length_to_pixel (float x, int nx, bool lim_inf=true, bool lim_sup=false, float scale=1.f)
 Converts a length value to a pixel index in a discretized space.
void hmap::grid_xy_vector (std::vector< float > &x, std::vector< float > &y, glm::ivec2 shape, const UvRect &uv_rect=UvRect::unit(), bool endpoint=false)
 Return x and y coordinates of a regular grid, as two 1D vectors.
void hmap::rescale_grid_from_unit_square_to_bbox (std::vector< float > &x, std::vector< float > &y, const UvRect &uv_rect)
 Rescale 1D grid vectors from unit square [0, 1] to target UV rectangle.

Variables

constexpr std::array< Neighbor, 4 > hmap::neighborhood::VON_NEUMANN_4
constexpr std::array< Neighbor, 8 > hmap::neighborhood::MOORE_8
constexpr std::array< Neighbor, 8 > hmap::neighborhood::D8_FLOW
constexpr std::array< NeighborWeighted, 8 > hmap::neighborhood::DINF_8
constexpr std::array< Neighbor, 8 > hmap::neighborhood::GEOMORPHON_8