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 "highmap/array.hpp"
33#include "macrologger.h"
34
35namespace hmap
36{
37
58Array non_parametric_sampling(const Array &array,
59 hmap::Vec2<int> patch_shape,
60 uint seed,
61 float error_threshold = 0.1f);
62
96Array quilting(const std::vector<const Array *> &p_arrays,
97 hmap::Vec2<int> patch_base_shape,
98 hmap::Vec2<int> tiling,
99 float overlap,
100 uint seed,
101 std::vector<Array *> secondary_arrays = {},
102 bool patch_flip = true,
103 bool patch_rotate = true,
104 bool patch_transpose = true,
105 float filter_width_ratio = 0.25f);
106
139Array quilting_blend(const std::vector<const Array *> &p_arrays,
140 hmap::Vec2<int> patch_base_shape,
141 float overlap,
142 uint seed,
143 bool patch_flip = true,
144 bool patch_rotate = true,
145 bool patch_transpose = true,
146 float filter_width_ratio = 0.25f);
147
185Array quilting_expand(const Array &array,
186 float expansion_ratio,
187 hmap::Vec2<int> patch_base_shape,
188 float overlap,
189 uint seed,
190 std::vector<Array *> secondary_arrays = {},
191 bool keep_input_shape = false,
192 bool patch_flip = true,
193 bool patch_rotate = true,
194 bool patch_transpose = true,
195 float filter_width_ratio = 0.25f);
196
230Array quilting_shuffle(const Array &array,
231 hmap::Vec2<int> patch_base_shape,
232 float overlap,
233 uint seed,
234 std::vector<Array *> secondary_arrays = {},
235 bool patch_flip = true,
236 bool patch_rotate = true,
237 bool patch_transpose = true,
238 float filter_width_ratio = 0.25f);
239
240} // namespace hmap
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
unsigned int uint
Definition array.hpp:14
Definition algebra.hpp:28
Array quilting_blend(const std::vector< const Array * > &p_arrays, hmap::Vec2< int > patch_base_shape, float overlap, uint 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:194
Array non_parametric_sampling(const Array &array, hmap::Vec2< int > patch_shape, uint 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:39
Array quilting(const std::vector< const Array * > &p_arrays, hmap::Vec2< int > patch_base_shape, hmap::Vec2< int > tiling, float overlap, uint 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:14
Array quilting_expand(const Array &array, float expansion_ratio, hmap::Vec2< int > patch_base_shape, float overlap, uint 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:223
Array quilting_shuffle(const Array &array, hmap::Vec2< int > patch_base_shape, float overlap, uint 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:319
Vec2 class for basic manipulation of 2D vectors.
Definition algebra.hpp:40