Core 1.0
|
A core analytic two-dimensional scalar field. More...
#include <scalarfield.h>
Public Member Functions | |
AnalyticScalarField2 (bool=true) | |
Constructor. | |
virtual double | Value (const Vector2 &) const |
Compute the value of the field. | |
virtual Vector2 | Gradient (const Vector2 &) const |
Compute the gradient of the field. | |
virtual Matrix2 | Hessian (const Vector2 &) const |
Compute the hessian at a given point. | |
virtual ScalarField2 | Sample (const Array2 &) const |
Create a discrete scalar field by sampling a given domain. | |
bool | Inside (const double &) const |
Check if the value is considered as inside or outside. | |
void | Curvature (const Vector2 &, double &, double &) const |
Compute the gaussian and mean curvatures. | |
virtual Box2 | GetBox () const |
Return the bounding box. | |
Protected Member Functions | |
Matrix | Local (const Vector2 &) const |
Compute the local neighborhood in the one-ring aroung a point. | |
Protected Attributes | |
bool | sign = true |
Sign convention, used for normal computation. | |
Box2 | box = Box2::Infinity |
Domain, set as infinite for base class. | |
Static Protected Attributes | |
static const double | epsilon = 1e-6 |
\epsilon; value for partial derivatives | |
A core analytic two-dimensional scalar field.
|
inline |
Constructor.
s | Sign, by default set sign convention to true, i.e., negative values inside and positive outside. |
void AnalyticScalarField2::Curvature | ( | const Vector2 & | p, |
double & | gaussian, | ||
double & | mean ) const |
Compute the gaussian and mean curvatures.
p | Point. |
gaussian | Returned gaussian curvature. |
mean | Returned mean curvature. |
Compute the gradient of the field.
p | Point. |
Compute the hessian at a given point.
p | Point. |
|
inline |
Check if the value is considered as inside or outside.
Result depend on the sign definition of the implicit surface.
v | Value. |
Compute the local neighborhood in the one-ring aroung a point.
p | Point. |
|
virtual |
Create a discrete scalar field by sampling a given domain.
a | Domain. |
Reimplemented in ExponentialSimplexNoise, NoiseTurbulence2, and SimplexTurbulence2.
|
virtual |
Compute the value of the field.
p | Point. |
Reimplemented in CellularTurbulence2, ExponentialSimplexNoise, GaborNoise, Noise2, NoiseTurbulence2, SimplexNoise2, SimplexTurbulence2, TurbulenceWormNoise, and WormNoise.