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