Core 1.0
Public Member Functions | Protected Member Functions | Static Protected Attributes | List of all members
SimplexNoise2 Class Reference

Simplex noise in the plane. More...

#include <noise.h>

Inheritance diagram for SimplexNoise2:
AnalyticScalarField2 ExponentialSimplexNoise SimplexTurbulence2

Public Member Functions

 SimplexNoise2 ()
 Empty.
 
 ~SimplexNoise2 ()
 Empty.
 
double Value (const Vector2 &) const
 Compute the simplex noise at a given point. More...
 
double K () const
 Return the global Lipschitz constant of the noise.
 
- Public Member Functions inherited from AnalyticScalarField2
 AnalyticScalarField2 ()
 Create an analytic scalar field defined over the entire plane.
 
virtual Vector2 Gradient (const Vector2 &) const
 Compute the gradient of the field. More...
 
virtual Matrix2 Hessian (const Vector2 &) const
 Compute the hessian at a given point. More...
 
virtual ScalarField2 Sample (const Array2 &) const
 Create a discrete scalar field by sampling a given domain. More...
 
void Curvature (const Vector2 &, double &, double &) const
 Compute the gaussian and mean curvatures. More...
 
virtual Box2 GetBox () const
 Return the bounding box.
 

Protected Member Functions

double dot (const int *, const double &, const double &) const
 Scalar product.
 
- Protected Member Functions inherited from AnalyticScalarField2
Matrix Local (const Vector2 &) const
 Compute the local neighborhood in the one-ring aroung a point. More...
 

Static Protected Attributes

static const int grad2 [8][2]
 Array of gradients for 2D noise.
 
static const int perm [512]
 Permutation table, 256 entries duplicated once to avoid modulo computations.
 
static const double G2 = (3.0 - sqrt(3.0)) / 6.0
 Unskew factors for planar case.
 
- Static Protected Attributes inherited from AnalyticScalarField2
static const double epsilon = 1e-6
 \epsilon; value for partial derivatives
 

Additional Inherited Members

- Protected Attributes inherited from AnalyticScalarField2
Box2 box = Box2::Infinity
 Domain, set as infinite for base class.
 

Detailed Description

Simplex noise in the plane.

Simplex noise functions return random values in [-1,+1] interval.

See also
Noise

Member Function Documentation

◆ Value()

double SimplexNoise2::Value ( const Vector2 p) const
virtual

Compute the simplex noise at a given point.

Parameters
pPoint.

Reimplemented from AnalyticScalarField2.

Reimplemented in SimplexTurbulence2.