22#include "macrologger.h"
95void rot90(Array &array);
119 bool zero_padding =
false);
171 bool periodic =
false,
172 const Array *p_noise_x =
nullptr,
173 const Array *p_noise_y =
nullptr,
174 Vec4<float> bbox = {0.f, 1.f, 0.f, 1.f});
194void warp(Array &array,
const Array *p_dx,
const Array *p_dy);
220 float amount = 0.02f,
222 bool reverse =
false);
251 float amount = 0.02f,
253 bool reverse =
false);
277 float amount = 0.02f,
279 bool reverse =
false);
306 float amount = 0.02f,
308 bool reverse =
false);
355Array
zoom(
const Array &array,
357 bool periodic =
false,
358 Vec2<float> center = {0.5f, 0.5f},
359 const Array *p_noise_x =
nullptr,
360 const Array *p_noise_y =
nullptr,
361 Vec4<float> bbox = {0.f, 1.f, 0.f, 1.f});
369void rotate(Array &array,
float angle,
bool zoom_in =
true);
372void warp(Array &array,
const Array *p_dx,
const Array *p_dy);
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
Definition blending.hpp:151
void warp(Array &array, const Array *p_dx, const Array *p_dy)
See hmap::warp.
Definition warp_gpu.cpp:9
void rotate(Array &array, float angle, bool zoom_in=true)
See hmap::rotate.
Definition transform_gpu.cpp:9
Definition algebra.hpp:28
void warp(Array &array, const Array *p_dx, const Array *p_dy)
Apply a warping effect to the array.
Definition warp.cpp:19
void flip_lr(Array &array)
Flip the array horizontally (left/right).
Definition transform.cpp:18
void flip_ud(Array &array)
Flip the array vertically (up/down).
Definition transform.cpp:25
void rot180(Array &array)
Rotate the array by 180 degrees.
Definition transform.cpp:32
void 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).
Definition warp.cpp:79
Array 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.
Definition transform.cpp:92
void rot270(Array &array)
Rotate the array by 270 degrees.
Definition transform.cpp:38
void rotate(Array &array, float angle, bool zoom_in=true, bool zero_padding=false)
Rotate the array by a specified angle.
Definition transform.cpp:50
Array transpose(const Array &array)
Return the transposed array.
Definition transform.cpp:124
Array 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.
Definition transform.cpp:135
float angle(const Point &p1, const Point &p2)
Computes the angle between two points relative to the x-axis.
Definition points.cpp:42
void rot90(Array &array)
Rotate the array by 90 degrees.
Definition transform.cpp:44
void 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).
Definition warp.cpp:34