|
Core 1.0
|
PCG2D hashing of two integer coordinates. More...
#include <hashing.h>
Static Public Member Functions | |
| static int | Integer (int, int) |
| Hash of integer coordinates. | |
| static double | Value (int, int) |
| Hash of integer coordinates, as a real number. | |
| static void | Integer2 (int, int, int &, int &) |
| Hash of integer coordinates, as two integers. | |
| static Vector2 | Value2 (int, int) |
| Hash of integer coordinates, as a vector in the plane. | |
| static QString | Glsl () |
| GLSL source code equivalent to the functions of Hash2. | |
Static Protected Member Functions | |
| static void | Pcg (uint32_t &, uint32_t &) |
| Core of the pcg2d hash. | |
PCG2D hashing of two integer coordinates.
Same as Hash, in the plane, using the pcg2d hash.
|
static |
GLSL source code equivalent to the functions of Hash2.
Defines the functions uvec2 Hash2u(uvec2), vec2 Hash2f(uvec2) (equivalent to Hash2::Integer2() and Hash2::Value2()), int HashInteger(int,int) and float HashValue(int,int) (equivalent to Hash2::Integer() and Hash2::Value()).
|
inlinestatic |
Hash of integer coordinates.
| x,y | Integer coordinates. |
|
inlinestatic |
Hash of integer coordinates, as two integers.
Unlike Hash2::Integer(), which only keeps the first component, the two components of the pcg2d output are returned.
| x,y | Integer coordinates. |
| a,b | Pseudo-random integers, covering the whole range of int. |
|
inlinestaticprotected |
Core of the pcg2d hash.
| x,y | Values, modified in place. |
|
inlinestatic |
Hash of integer coordinates, as a real number.
| x,y | Integer coordinates. |
|
inlinestatic |
Hash of integer coordinates, as a vector in the plane.
Each coordinate of the vector is computed as in Hash2::Value() from the corresponding component of the pcg2d output.
| x,y | Integer coordinates. |