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

Path class for manipulating and analyzing paths through array/grid indices (i, j). More...

Go to the source code of this file.

Classes

class  hmap::CellPath
 Ordered path of grid cell indices. More...

Namespaces

namespace  hmap

Functions

void hmap::add_line_bresenham (CellPath &out, glm::ivec2 a, glm::ivec2 b)
 Rasterizes a segment between two integer points using Bresenham's algorithm.
void hmap::add_noise (CellPath &path, std::uint32_t seed, float kw, float amp, const glm::ivec2 &shape, NoiseType noise_type=NoiseType::PERLIN, int octaves=8, float weight=0.7f, float persistence=0.5f, float lacunarity=2.f)
 Applies transverse noise displacement along an integer path.
void hmap::enforce_path_adjacency (CellPath &path)
 Ensures that an integer path is grid-adjacent and gap-free.
bool hmap::is_path_adjacent (const CellPath &path)
 Checks if a grid path has no gaps (8-connectivity).

Detailed Description

Path class for manipulating and analyzing paths through array/grid indices (i, j).