Hashing functions.
More...
#include <noise.h>
|
static int | Integer (int, int, int) |
| Fast integer hashing.
|
|
static unsigned int | Morton (unsigned int, unsigned int) |
| Morton codes in the plane.
|
|
static unsigned int | Morton (unsigned int, unsigned int, unsigned int) |
| Morton codes.
|
|
static int | Double (const double &, const double &, const double &) |
| Fast hashing for points.
|
|
static int | Double (const double &, const double &) |
| Fast hashing for points in the plane.
|
|
static int | Double (const Vector &) |
| Fast and convenient hashing for vectors.
|
|
static int | Double (const Vector2 &) |
| Fast and convenient hashing for vectors in the plane.
|
|
Hashing functions.
A good reference to a variety of hashing functions: http://burtleburtle.net/bob/hash/integer.html
This class implements several simple and efficient hashing functions, which are used in the definition or some noise classes such as GaborNoise.
◆ Double() [1/4]
int Hashing::Double |
( |
const double & | x, |
|
|
const double & | y ) |
|
inlinestatic |
Fast hashing for points in the plane.
- Parameters
-
◆ Double() [2/4]
int Hashing::Double |
( |
const double & | x, |
|
|
const double & | y, |
|
|
const double & | z ) |
|
inlinestatic |
Fast hashing for points.
- Parameters
-
◆ Double() [3/4]
int Hashing::Double |
( |
const Vector & | p | ) |
|
|
static |
◆ Double() [4/4]
int Hashing::Double |
( |
const Vector2 & | p | ) |
|
|
static |
◆ Integer()
int Hashing::Integer |
( |
int | x, |
|
|
int | y, |
|
|
int | z ) |
|
inlinestatic |
Fast integer hashing.
- Parameters
-
x,y,z | Integer coordinates. |
◆ Morton() [1/2]
unsigned int Hashing::Morton |
( |
unsigned int | x, |
|
|
unsigned int | y ) |
|
static |
Morton codes in the plane.
- Parameters
-
x,y | Integer positive coordinates |
◆ Morton() [2/2]
unsigned int Hashing::Morton |
( |
unsigned int | x, |
|
|
unsigned int | y, |
|
|
unsigned int | z ) |
|
static |
Morton codes.
- Parameters
-
x,y,z | Integer positive coordinates |