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,
39 Array &target,
40 bool endpoint = false);
41
42void interpolate_array_bicubic(const Array &source,
43 Array &target,
44 const Vec4<float> &bbox_source,
45 const Vec4<float> &bbox_target,
46 bool endpoint = false);
47
48void interpolate_array_bilinear(const Array &source,
49 Array &target,
50 bool endpoint = false);
51
52void interpolate_array_bilinear(const Array &source,
53 Array &target,
54 const Vec4<float> &bbox_source,
55 const Vec4<float> &bbox_target,
56 bool endpoint = false);
57
58void interpolate_array_nearest(const Array &source,
59 Array &target,
60 bool endpoint = false);
61
62void interpolate_array_nearest(const Array &source,
63 Array &target,
64 const Vec4<float> &bbox_source,
65 const Vec4<float> &bbox_target,
66 bool endpoint = false);
67
68void interpolate_heightmap(const hmap::Heightmap &h_source,
69 hmap::Heightmap &h_target,
70 const CoordFrame &t_source,
71 const CoordFrame &t_target);
72
73} // namespace hmap
74
75namespace hmap::gpu
76{
77
78void interpolate_array_bicubic(const Array &source, Array &target);
79
80void interpolate_array_bicubic(const Array &source,
81 Array &target,
82 const Vec4<float> &bbox_source,
83 const Vec4<float> &bbox_target);
84
85void interpolate_array_bilinear(const Array &source, Array &target);
86
87void interpolate_array_bilinear(const Array &source,
88 Array &target,
89 const Vec4<float> &bbox_source,
90 const Vec4<float> &bbox_target);
91
92void interpolate_array_lagrange(const Array &source, Array &target, int order);
93
94void interpolate_array_nearest(const Array &source, Array &target);
95
96void interpolate_array_nearest(const Array &source,
97 Array &target,
98 const Vec4<float> &bbox_source,
99 const Vec4<float> &bbox_target);
100
101} // 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:186
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_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, bool endpoint=false)
Definition interpolate_array.cpp:14
void interpolate_array_bilinear(const Array &source, Array &target, bool endpoint=false)
Definition interpolate_array.cpp:93
void interpolate_array_nearest(const Array &source, Array &target, bool endpoint=false)
Definition interpolate_array.cpp:166