Infinite plane with spatially bounded surface noise (Perlin noise).
More...
#include <CD_BoundedNoisePlane.H>
|
| | BoundedNoisePlane (const std::string &a_orientation, const RealVect &a_point, const RealVect &a_clampLo, const RealVect &a_clampHi, const Real a_clampK, const Real a_noiseAmp, const RealVect &a_noiseFreq, const Real a_persistence, const int a_octaves, const bool a_reseed=false) |
| | Full constructor.
|
| |
| | BoundedNoisePlane (const BoundedNoisePlane &a_inputIF) |
| | Copy constructor.
|
| |
|
virtual | ~BoundedNoisePlane () |
| | Destructor (does nothing)
|
| |
| virtual Real | value (const RealVect &a_pos) const |
| | Value function.
|
| |
| virtual BaseIF * | newImplicitFunction () const |
| | Factory method.
|
| |
|
|
std::pair< int, int > | m_normal |
| | Plane normal. This is in the form of a coordinate direction and a sign.
|
| |
|
RealVect | m_point |
| | Plane point.
|
| |
|
RealVect | m_clampLo |
| | Low clamped value.
|
| |
|
RealVect | m_clampHi |
| | Low clamped value.
|
| |
|
Real | m_clampK |
| | Transition length.
|
| |
|
Real | m_maxAmp |
| | Maximum noise amplitude.
|
| |
|
RefCountedPtr< BaseIF > | m_plane |
| | BaseIF function for a plane without noise.
|
| |
|
RefCountedPtr< BaseIF > | m_perlin |
| | Noise function.
|
| |
Infinite plane with spatially bounded surface noise (Perlin noise).
The surface noise is bounded by a smoothed boxcar function between the input arguments. The boxcar function is given by b(x) = h(x-a) - h(x-b) where h(x) = 1/(1 + exp(-2*k*x)) where k determines the falloff.
◆ BoundedNoisePlane() [1/2]
| BoundedNoisePlane::BoundedNoisePlane |
( |
const std::string & |
a_orientation, |
|
|
const RealVect & |
a_point, |
|
|
const RealVect & |
a_clampLo, |
|
|
const RealVect & |
a_clampHi, |
|
|
const Real |
a_clampK, |
|
|
const Real |
a_noiseAmp, |
|
|
const RealVect & |
a_noiseFreq, |
|
|
const Real |
a_persistence, |
|
|
const int |
a_octaves, |
|
|
const bool |
a_reseed = false |
|
) |
| |
Full constructor.
- Parameters
-
| [in] | a_orientation | Plane orientation. Must be x+, x-, y+, y-, etc |
| [in] | a_point | Point on the plane |
| [in] | a_clampLo | Low clamped corner. |
| [in] | a_clampHi | High clamped corner. |
| [in] | a_clampK | K-value for clamping. |
| [in] | a_noiseAmp | Noise amplitude |
| [in] | a_noiseFreq | Noise frequency |
| [in] | a_persistence | Factor for noise octaves. |
| [in] | a_octaves | Number of octaves |
| [in] | a_reseed | If true, reseed the RNG. Otherwise, the the original Perlin hash table. |
- Note
- The persistence argument indicates how we add octaves. With 0.5 we use half the amplitude and twice the frequency for the next octave.
◆ BoundedNoisePlane() [2/2]
Copy constructor.
- Parameters
-
◆ newImplicitFunction()
| BaseIF * BoundedNoisePlane::newImplicitFunction |
( |
| ) |
const |
|
virtual |
Factory method.
- Returns
- Returns new plane with same parameters.
◆ value()
| Real BoundedNoisePlane::value |
( |
const RealVect & |
a_pos | ) |
const |
|
virtual |
Value function.
- Parameters
-
- Returns
- Function value at the given point
The documentation for this class was generated from the following files: