Core 1.0
Public Member Functions | Protected Member Functions | List of all members
WormNoise Class Reference

Worm noise. More...

#include <wormnoise.h>

Inheritance diagram for WormNoise:
AnalyticScalarField2

Public Member Functions

 WormNoise (double, const Vector2 &)
 Create worm noise. More...
 
Vector Noise (const Vector2 &) const
 Compute worm noise value. More...
 
double Value (const Vector2 &) const
 Compute worm noise value. More...
 
- 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

Vector2 Hash (const Vector2 &) const
 Hash function for worm noise. More...
 
- Protected Member Functions inherited from AnalyticScalarField2
Matrix Local (const Vector2 &) const
 Compute the local neighborhood in the one-ring aroung a point. More...
 

Additional Inherited Members

- Protected Attributes inherited from AnalyticScalarField2
Box2 box = Box2::Infinity
 Domain, set as infinite for base class.
 
- Static Protected Attributes inherited from AnalyticScalarField2
static const double epsilon = 1e-6
 \epsilon; value for partial derivatives
 

Detailed Description

Worm noise.

Author
Hugo Schott

https://www.shadertoy.com/view/tlfczS

Constructor & Destructor Documentation

◆ WormNoise()

WormNoise::WormNoise ( double  t,
const Vector2 o 
)
explicit

Create worm noise.

Parameters
tThickness.
oOffset.

Member Function Documentation

◆ Hash()

Vector2 WormNoise::Hash ( const Vector2 p) const
protected

Hash function for worm noise.

Parameters
pPoint.

◆ Noise()

Vector WormNoise::Noise ( const Vector2 p) const

Compute worm noise value.

Parameters
pPoint.

◆ Value()

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

Compute worm noise value.

Parameters
pPoint.

Reimplemented from AnalyticScalarField2.