HighMap library (C++)
Loading...
Searching...
No Matches
interpolate2d.hpp File Reference

Header file for 2D interpolation methods. More...

Go to the source code of this file.

Namespaces

namespace  hmap
 
namespace  hmap::gpu
 

Enumerations

enum  hmap::InterpolationMethod2D : int { hmap::DELAUNAY , hmap::NEAREST }
 Enumeration of 2D interpolation methods. More...
 

Functions

float hmap::bilinear_interp (float f00, float f10, float f01, float f11, float u, float v)
 Compute the bilinear interpolated value from four input values.
 
float hmap::cubic_interpolate (float p[4], float x)
 
Array hmap::harmonic_interpolation (const Array &array, const Array &mask_fixed_values, int iterations_max=500, float tolerance=1e-5f, float omega=1.8f)
 Perform harmonic interpolation on a 2D array using the Successive Over-Relaxation (SOR) method.
 
Array hmap::interpolate2d (glm::ivec2 shape, const std::vector< float > &x, const std::vector< float > &y, const std::vector< float > &values, InterpolationMethod2D interpolation_method, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, const Array *p_stretching=nullptr, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f})
 Generic 2D interpolation function.
 
Array hmap::interpolate2d_nearest (glm::ivec2 shape, const std::vector< float > &x, const std::vector< float > &y, const std::vector< float > &values, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, const Array *p_stretching=nullptr, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f})
 2D interpolation using the nearest neighbor method.
 
Array hmap::interpolate2d_delaunay (glm::ivec2 shape, const std::vector< float > &x, const std::vector< float > &y, const std::vector< float > &values, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, const Array *p_stretching=nullptr, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f})
 2D interpolation using the Delaunay triangulation method.
 
Array hmap::gpu::harmonic_interpolation (const Array &array, const Array &mask_fixed_values, int iterations_max=500)
 See hmap::harmonic_interpolation.
 

Detailed Description

Header file for 2D interpolation methods.

Author
Otto Link (otto..nosp@m.link.nosp@m..bv@g.nosp@m.mail.nosp@m..com)

This file provides declarations for functions and enumerations related to 2D interpolation. It supports different interpolation methods, including Delaunay triangulation and nearest point interpolation. These functions allow for the interpolation of values on a 2D grid using various techniques.