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. | |
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.