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"
16
17namespace hmap
18{
19
20void interpolate_array_bicubic(const Array &source,
21 Array &target,
22 bool endpoint = false,
23 bool pixel_centered = true);
24
25void interpolate_array_bicubic(const Array &source,
26 Array &target,
27 const glm::vec4 &bbox_source,
28 const glm::vec4 &bbox_target,
29 bool endpoint = false,
30 bool pixel_centered = true);
31
32void interpolate_array_bilinear(const Array &source,
33 Array &target,
34 bool endpoint = false,
35 bool pixel_centered = true);
36
37void interpolate_array_bilinear(const Array &source,
38 Array &target,
39 const glm::vec4 &bbox_source,
40 const glm::vec4 &bbox_target,
41 bool endpoint = false,
42 bool pixel_centered = true);
43
44void interpolate_array_nearest(const Array &source,
45 Array &target,
46 bool endpoint = false);
47
48void interpolate_array_nearest(const Array &source,
49 Array &target,
50 const glm::vec4 &bbox_source,
51 const glm::vec4 &bbox_target,
52 bool endpoint = false);
53
54// virtual arrays
55
56void flatten_heightmap(VirtualArray &h_source1,
57 const VirtualArray &h_source2,
58 const CoordFrame &t_source1,
59 const CoordFrame &t_source2,
60 const ComputeMode &cm);
61
62void flatten_heightmap(const std::vector<const VirtualArray *> &h_sources,
63 VirtualArray &h_target,
64 const std::vector<const CoordFrame *> &t_sources,
65 const CoordFrame &t_target,
66 const ComputeMode &cm);
67
68void interpolate_heightmap(const VirtualArray &h_source,
69 VirtualArray &h_target,
70 const CoordFrame &t_source,
71 const CoordFrame &t_target,
72 const ComputeMode &cm);
73
74} // namespace hmap
75
76namespace hmap::gpu
77{
78
79void interpolate_array_bicubic(const Array &source, Array &target);
80
81void interpolate_array_bicubic(const Array &source,
82 Array &target,
83 const glm::vec4 &bbox_source,
84 const glm::vec4 &bbox_target);
85
86void interpolate_array_bilinear(const Array &source, Array &target);
87
88void interpolate_array_bilinear(const Array &source,
89 Array &target,
90 const glm::vec4 &bbox_source,
91 const glm::vec4 &bbox_target);
92
93void interpolate_array_lagrange(const Array &source, Array &target, int order);
94
95void interpolate_array_nearest(const Array &source, Array &target);
96
97void interpolate_array_nearest(const Array &source,
98 Array &target,
99 const glm::vec4 &bbox_source,
100 const glm::vec4 &bbox_target);
101
102} // namespace hmap::gpu
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
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:22
void interpolate_array_bilinear(const Array &source, Array &target, bool endpoint=false, bool pixel_centered=true)
Definition interpolate_array.cpp:105
void interpolate_array_bicubic(const Array &source, Array &target, bool endpoint=false, bool pixel_centered=true)
Definition interpolate_array.cpp:14
void interpolate_heightmap(const VirtualArray &h_source, VirtualArray &h_target, const CoordFrame &t_source, const CoordFrame &t_target, const ComputeMode &cm)
Definition interpolate_heightmap_virtual_array.cpp:80
void interpolate_array_nearest(const Array &source, Array &target, bool endpoint=false)
Definition interpolate_array.cpp:186
void flatten_heightmap(VirtualArray &h_source1, const VirtualArray &h_source2, const CoordFrame &t_source1, const CoordFrame &t_source2, const ComputeMode &cm)
Definition interpolate_heightmap_virtual_array.cpp:14