HighMap library (C++)
Loading...
Searching...
No Matches
cloud_functions.cpp File Reference

Namespaces

namespace  hmap

Functions

Array hmap::cloud_sdf_to_array (const Cloud &cloud, glm::ivec2 shape, const BBox2D &bbox_array=BBox2D::unit(), const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr)
 Compute a distance field from a point cloud.
bool hmap::has_duplicates (const Cloud &cloud, float eps=1e-9f, bool xy_only=true)
 Checks whether the point cloud contains duplicate points.
std::vector< float > hmap::interpolate_values_from_array (const Cloud &cloud, const Array &array, const BBox2D &bbox)
 Interpolate values from an array at the points' (x, y) locations.
void hmap::rejection_filter_density (Cloud &cloud, const Array &density_mask, std::uint32_t seed, const BBox2D &bbox=BBox2D{})
 Filter a point cloud using rejection sampling based on a density mask.
Cloud hmap::scale (const Cloud &cloud, glm::vec2 scale, glm::vec2 center={0.5f, 0.5f})
 Scales the point coordinates in a cloud relative to a center point.
Cloud hmap::scale (const Cloud &cloud, float scale, glm::vec2 center={0.5f, 0.5f})