HighMap library (C++)
Loading...
Searching...
No Matches
interpolate_array.hpp
Go to the documentation of this file.
1/* Copyright (c) 2025 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
12#pragma once
13#include "highmap/array.hpp"
15
16namespace hmap
17{
18
19// in-place source1 <= source1 & source2
20void flatten_heightmap(Heightmap &h_source1,
21 const Heightmap &h_source2,
22 const CoordFrame &t_source1,
23 const CoordFrame &t_source2);
24
25// input kept target <= source1 & source2
26void flatten_heightmap(const Heightmap &h_source1,
27 const Heightmap &h_source2,
28 Heightmap &h_target,
29 const CoordFrame &t_source1,
30 const CoordFrame &t_source2,
31 const CoordFrame &t_target);
32
33void flatten_heightmap(const std::vector<const Heightmap *> &h_sources,
34 Heightmap &h_target,
35 const std::vector<const CoordFrame *> &t_sources,
36 const CoordFrame &t_target);
37
38void interpolate_array_bicubic(const Array &source, Array &target);
39
40void interpolate_array_bicubic(const Array &source,
41 Array &target,
42 const Vec4<float> &bbox_source,
43 const Vec4<float> &bbox_target);
44
45void interpolate_array_bilinear(const Array &source, Array &target);
46
47void interpolate_array_bilinear(const Array &source,
48 Array &target,
49 const Vec4<float> &bbox_source,
50 const Vec4<float> &bbox_target);
51
52void interpolate_array_nearest(const Array &source, Array &target);
53
54void interpolate_array_nearest(const Array &source,
55 Array &target,
56 const Vec4<float> &bbox_source,
57 const Vec4<float> &bbox_target);
58
59void interpolate_heightmap(const hmap::Heightmap &h_source,
60 hmap::Heightmap &h_target,
61 const CoordFrame &t_source,
62 const CoordFrame &t_target);
63
64} // namespace hmap
65
66namespace hmap::gpu
67{
68
69void interpolate_array_bicubic(const Array &source, Array &target);
70
71void interpolate_array_bicubic(const Array &source,
72 Array &target,
73 const Vec4<float> &bbox_source,
74 const Vec4<float> &bbox_target);
75
76void interpolate_array_bilinear(const Array &source, Array &target);
77
78void interpolate_array_bilinear(const Array &source,
79 Array &target,
80 const Vec4<float> &bbox_source,
81 const Vec4<float> &bbox_target);
82
83void interpolate_array_lagrange(const Array &source, Array &target, int order);
84
85void interpolate_array_nearest(const Array &source, Array &target);
86
87void interpolate_array_nearest(const Array &source,
88 Array &target,
89 const Vec4<float> &bbox_source,
90 const Vec4<float> &bbox_target);
91
92} // namespace hmap::gpu
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
HeightMap class, to manipulate heightmap (with contextual informations).
Definition heightmap.hpp:150
Definition blending.hpp:151
void interpolate_array_bicubic(const Array &source, Array &target)
Definition interpolate_array_gpu.cpp:37
void interpolate_array_bilinear(const Array &source, Array &target)
Definition interpolate_array_gpu.cpp:89
void interpolate_array_nearest(const Array &source, Array &target)
Definition interpolate_array_gpu.cpp:155
void interpolate_array_lagrange(const Array &source, Array &target, int order)
Definition interpolate_array_gpu.cpp:133
Definition algebra.hpp:28
void flatten_heightmap(Heightmap &h_source1, const Heightmap &h_source2, const CoordFrame &t_source1, const CoordFrame &t_source2)
Definition interpolate_heightmap.cpp:13
void interpolate_array_nearest(const Array &source, Array &target)
Definition interpolate_array.cpp:160
void interpolate_heightmap(const hmap::Heightmap &h_source, hmap::Heightmap &h_target, const CoordFrame &t_source, const CoordFrame &t_target)
Definition interpolate_heightmap.cpp:133
void interpolate_array_bicubic(const Array &source, Array &target)
Definition interpolate_array.cpp:14
void interpolate_array_bilinear(const Array &source, Array &target)
Definition interpolate_array.cpp:92