HighMap library (C++)
Loading...
Searching...
No Matches
add_noise.cpp File Reference

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).