Core 1.0
|
Perlin noise. More...
#include <noise.h>
Public Member Functions | |
Noise2 (bool=false) | |
Create a noise function. More... | |
~Noise2 () | |
Empty. | |
double | Value (const Vector2 &) const |
Compute noise at a given point in the plane. 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 Attributes | |
bool | quintic |
Flag defining interpolation type: either cubic (false) or quintic (true). | |
Protected Attributes inherited from AnalyticScalarField2 | |
Box2 | box = Box2::Infinity |
Domain, set as infinite for base class. | |
Static Protected Attributes | |
static double | rtable [267] |
Random double table. | |
static const short | hashTable [4096] |
Hash table. | |
Static Protected Attributes inherited from AnalyticScalarField2 | |
static const double | epsilon = 1e-6 |
\epsilon; value for partial derivatives | |
Additional Inherited Members | |
Protected Member Functions inherited from AnalyticScalarField2 | |
Matrix | Local (const Vector2 &) const |
Compute the local neighborhood in the one-ring aroung a point. More... | |
Perlin noise.
This class is used as a core class to create various types of fractal noise, such as sums of scaled noises.
Noise2::Noise2 | ( | bool | quintic = false | ) |
Create a noise function.
quintic | Flag defining whether quintic interpolation will be used, noise uses cubic interpolation if set to false. |
|
virtual |
Compute noise at a given point in the plane.
p | Point. |
Reimplemented from AnalyticScalarField2.
Reimplemented in NoiseTurbulence2.