Core 1.0
Hashing Class Reference

Hashing functions. More...

#include <noise.h>

Static Public Member Functions

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.
 

Detailed Description

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.

Member Function Documentation

◆ Double() [1/4]

int Hashing::Double ( const double & x,
const double & y )
inlinestatic

Fast hashing for points in the plane.

Parameters
x,yReal coordinates.

◆ Double() [2/4]

int Hashing::Double ( const double & x,
const double & y,
const double & z )
inlinestatic

Fast hashing for points.

Parameters
x,y,zReal coordinates.

◆ Double() [3/4]

int Hashing::Double ( const Vector & p)
static

Fast and convenient hashing for vectors.

See also
Hashing::Double(const double&, const double&, const double&)
Parameters
pPoint.

◆ Double() [4/4]

int Hashing::Double ( const Vector2 & p)
static

Fast and convenient hashing for vectors in the plane.

Parameters
pPoint.
See also
Hashing::Double(const double&, const double&)

◆ Integer()

int Hashing::Integer ( int x,
int y,
int z )
inlinestatic

Fast integer hashing.

Parameters
x,y,zInteger coordinates.

◆ Morton() [1/2]

unsigned int Hashing::Morton ( unsigned int x,
unsigned int y )
static

Morton codes in the plane.

Parameters
x,yInteger positive coordinates

◆ Morton() [2/2]

unsigned int Hashing::Morton ( unsigned int x,
unsigned int y,
unsigned int z )
static

Morton codes.

Parameters
x,y,zInteger positive coordinates