HighMap library (C++)
Loading...
Searching...
No Matches
synthesis.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
30#pragma once
31
32#include "macrologger.h"
33
34#include "highmap/array.hpp"
35
36namespace hmap
37{
38
59Array non_parametric_sampling(const Array &array,
60 glm::ivec2 patch_shape,
61 std::uint32_t seed,
62 float error_threshold = 0.1f);
63
97Array quilting(const std::vector<const Array *> &p_arrays,
98 glm::ivec2 patch_base_shape,
99 glm::ivec2 tiling,
100 float overlap,
101 std::uint32_t seed,
102 std::vector<Array *> secondary_arrays = {},
103 bool patch_flip = true,
104 bool patch_rotate = true,
105 bool patch_transpose = true,
106 float filter_width_ratio = 0.25f);
107
140Array quilting_blend(const std::vector<const Array *> &p_arrays,
141 glm::ivec2 patch_base_shape,
142 float overlap,
143 std::uint32_t seed,
144 bool patch_flip = true,
145 bool patch_rotate = true,
146 bool patch_transpose = true,
147 float filter_width_ratio = 0.25f);
148
186Array quilting_expand(const Array &array,
187 float expansion_ratio,
188 glm::ivec2 patch_base_shape,
189 float overlap,
190 std::uint32_t seed,
191 std::vector<Array *> secondary_arrays = {},
192 bool keep_input_shape = false,
193 bool patch_flip = true,
194 bool patch_rotate = true,
195 bool patch_transpose = true,
196 float filter_width_ratio = 0.25f);
197
231Array quilting_shuffle(const Array &array,
232 glm::ivec2 patch_base_shape,
233 float overlap,
234 std::uint32_t seed,
235 std::vector<Array *> secondary_arrays = {},
236 bool patch_flip = true,
237 bool patch_rotate = true,
238 bool patch_transpose = true,
239 float filter_width_ratio = 0.25f);
240
241} // namespace hmap
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
Definition algebra.hpp:23
Array quilting_blend(const std::vector< const Array * > &p_arrays, glm::ivec2 patch_base_shape, float overlap, std::uint32_t seed, bool patch_flip=true, bool patch_rotate=true, bool patch_transpose=true, float filter_width_ratio=0.25f)
Synthesize a new heightmap by stitching together small patches from a list of input heightmaps.
Definition quilting.cpp:203
Array quilting_expand(const Array &array, float expansion_ratio, glm::ivec2 patch_base_shape, float overlap, std::uint32_t seed, std::vector< Array * > secondary_arrays={}, bool keep_input_shape=false, bool patch_flip=true, bool patch_rotate=true, bool patch_transpose=true, float filter_width_ratio=0.25f)
Synthesize a new heightmap by expanding the input heightmap and stitching patches.
Definition quilting.cpp:233
Array quilting(const std::vector< const Array * > &p_arrays, glm::ivec2 patch_base_shape, glm::ivec2 tiling, float overlap, std::uint32_t seed, std::vector< Array * > secondary_arrays={}, bool patch_flip=true, bool patch_rotate=true, bool patch_transpose=true, float filter_width_ratio=0.25f)
Synthesize a new heightmap by stitching together small patches from input heightmaps.
Definition quilting.cpp:19
Array quilting_shuffle(const Array &array, glm::ivec2 patch_base_shape, float overlap, std::uint32_t seed, std::vector< Array * > secondary_arrays={}, bool patch_flip=true, bool patch_rotate=true, bool patch_transpose=true, float filter_width_ratio=0.25f)
Synthesize a new heightmap by reshuffling patches of the input heightmap.
Definition quilting.cpp:329
Array non_parametric_sampling(const Array &array, glm::ivec2 patch_shape, std::uint32_t seed, float error_threshold=0.1f)
Synthesize a new heightmap based on an input array using a non-parametric sampling method.
Definition non_parameteric_sampling.cpp:49