HighMap library (C++)
Loading...
Searching...
No Matches
random.hpp
Go to the documentation of this file.
1/* Copyright (c) 2023 Otto Link. Distributed under the terms of the GNU General
2 Public License. The full license is in the file LICENSE, distributed with
3 this software. */
4
10#pragma once
11
12#include "highmap/array.hpp"
13
14namespace hmap
15{
16
34Array white(glm::ivec2 shape, float a, float b, std::uint32_t seed);
35
49Array white_density_map(const Array &density_map, std::uint32_t seed);
50
70Array white_sparse(glm::ivec2 shape,
71 float a,
72 float b,
73 float density,
74 std::uint32_t seed);
75
85Array white_sparse_binary(glm::ivec2 shape, float density, std::uint32_t seed);
86
87} // namespace hmap
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
Definition algebra.hpp:23
Array white(glm::ivec2 shape, float a, float b, std::uint32_t seed)
Return an array filled with white noise.
Definition white.cpp:13
Array white_density_map(const Array &density_map, std::uint32_t seed)
Return an array filled 1 with a probability based on a density map.
Definition white.cpp:25
Array white_sparse_binary(glm::ivec2 shape, float density, std::uint32_t seed)
Return an array sparsely filled with random 0 and 1.
Definition white.cpp:58
Array white_sparse(glm::ivec2 shape, float a, float b, float density, std::uint32_t seed)
Return an array sparsely filled with white noise.
Definition white.cpp:40