|
HighMap library (C++)
|
Header file for array transformation functions including rotation, flipping, warping, and transposition. More...
Go to the source code of this file.
Namespaces | |
| namespace | hmap |
| namespace | hmap::gpu |
Functions | |
| void | hmap::flip_lr (Array &array) |
| Flip the array horizontally (left/right). | |
| void | hmap::flip_ud (Array &array) |
| Flip the array vertically (up/down). | |
| void | hmap::rot180 (Array &array) |
| Rotate the array by 180 degrees. | |
| void | hmap::rot270 (Array &array) |
| Rotate the array by 270 degrees. | |
| void | hmap::rot90 (Array &array) |
| Rotate the array by 90 degrees. | |
| void | hmap::rotate (Array &array, float angle, bool zoom_in=true, bool zero_padding=false) |
| Rotate the array by a specified angle. | |
| Array | hmap::transpose (const Array &array) |
| Return the transposed array. | |
| Array | hmap::translate (const Array &array, float dx, float dy, bool periodic=false, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, Vec4< float > bbox={0.f, 1.f, 0.f, 1.f}) |
| Translates a 2D array by a specified amount along the x and y axes. | |
| void | hmap::warp (Array &array, const Array *p_dx, const Array *p_dy) |
| Apply a warping effect to the array. | |
| void | hmap::warp_directional (Array &array, float angle, float amount=0.02f, int ir=4, bool reverse=false) |
| Apply a warping effect following the downward local gradient direction (deflate/inflate effect). | |
| void | hmap::warp_directional (Array &array, float angle, const Array *p_mask, float amount=0.02f, int ir=4, bool reverse=false) |
| Apply a warping effect following the downward local gradient direction (deflate/inflate effect) with a mask. | |
| void | hmap::warp_downslope (Array &array, float amount=0.02f, int ir=4, bool reverse=false) |
| Apply a warping effect following the downward local gradient direction (deflate/inflate effect). | |
| void | hmap::warp_downslope (Array &array, const Array *p_mask, float amount=0.02f, int ir=4, bool reverse=false) |
| Apply a warping effect following the downward local gradient direction (deflate/inflate effect) with a mask. | |
| Array | hmap::zoom (const Array &array, float zoom_factor, bool periodic=false, Vec2< float > center={0.5f, 0.5f}, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, Vec4< float > bbox={0.f, 1.f, 0.f, 1.f}) |
| Applies a zoom effect to a 2D array with an adjustable center. | |
| Array | hmap::gpu::advection_particle (const Array &z, const Array &advected_field, int iterations, int nparticles, uint seed, bool reverse=false, bool post_filter=true, float post_filter_sigma=0.125f, float advection_length=0.1f, float value_persistence=0.99f, float inertia=0.f, const Array *p_advection_mask=nullptr, const Array *p_mask=nullptr) |
| Performs particle-based advection on a scalar field. | |
| Array | hmap::gpu::advection_particle (const Array &z, const Array &advected_field, int nparticles, uint seed, bool reverse=false, bool post_filter=true, float post_filter_sigma=0.125f, float advection_length=0.1f, float value_persistence=0.99f, float inertia=0.f, const Array *p_advection_mask=nullptr, const Array *p_mask=nullptr) |
| Array | hmap::gpu::advection_particle (const Array &dx, const Array &dy, const Array &advected_field, int nparticles, uint seed, bool reverse=false, bool post_filter=true, float post_filter_sigma=0.125f, float advection_length=0.1f, float value_persistence=0.99f, float inertia=0.f, const Array *p_advection_mask=nullptr, const Array *p_mask=nullptr) |
| Array | hmap::gpu::advection_warp (const Array &z, const Array &advected_field, float advection_length=0.1f, float value_persistence=0.9f, const Array *p_mask=nullptr) |
| Performs 2D field advection based on the gradient of a heightmap using a warp-based technic (simplified approach). | |
| Array | hmap::gpu::advection_warp (const Array &z, const Array &advected_field, const Array &dx, const Array &dy, float advection_length=0.1f, float value_persistence=0.9f, const Array *p_mask=nullptr) |
| void | hmap::gpu::rotate (Array &array, float angle, bool zoom_in=true) |
| See hmap::rotate. | |
| void | hmap::gpu::warp (Array &array, const Array *p_dx, const Array *p_dy) |
| See hmap::warp. | |
Header file for array transformation functions including rotation, flipping, warping, and transposition.
This header file provides declarations for various functions used to transform arrays in different ways. It includes functionalities for rotating arrays, flipping them horizontally or vertically, applying warping effects, and transposing arrays. These transformations are useful in image processing, data manipulation, and other applications requiring geometric modifications of arrays.