chombo-discharge
Public Member Functions | Protected Attributes | List of all members
PerlinPlaneSdf Class Reference

Infinite plane with surface noise (Perlin noise). More...

#include <CD_PerlinPlaneSdf.H>

Inheritance diagram for PerlinPlaneSdf:
Inheritance graph
[legend]
Collaboration diagram for PerlinPlaneSdf:
Collaboration graph
[legend]

Public Member Functions

 PerlinPlaneSdf (const RealVect a_normal, const RealVect a_point, const bool a_inside, const Real a_noiseAmp, const RealVect a_noiseFreq, const Real a_persistence, const int a_octaves, const bool a_reseed=false)
 Full constructor. More...
 
 PerlinPlaneSdf (const PerlinPlaneSdf &a_inputIF)
 Copy constructor. More...
 
virtual ~PerlinPlaneSdf ()
 Destructor (does nothing)
 
virtual Real value (const RealVect &a_pos) const
 Value function. More...
 
virtual BaseIF * newImplicitFunction () const
 Factory method. More...
 

Protected Attributes

RealVect m_normal
 Plane normal.
 
RealVect m_point
 Plane point.
 
RefCountedPtr< BaseIF > m_plane
 BaseIF function for a plane without noise.
 
RefCountedPtr< BaseIF > m_perlin
 Noise function.
 

Detailed Description

Infinite plane with surface noise (Perlin noise).

Constructor & Destructor Documentation

◆ PerlinPlaneSdf() [1/2]

PerlinPlaneSdf::PerlinPlaneSdf ( const RealVect  a_normal,
const RealVect  a_point,
const bool  a_inside,
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_pointPoint on the plane
[in]a_normalPlane normal vector
[in]a_insideInside or outside
[in]a_noiseAmpNoise amplitude
[in]a_noiseFreqNoise frequency
[in]a_persistenceFactor for noise octaves.
[in]a_octavesNumber of octaves
[in]a_reseedIf 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.

◆ PerlinPlaneSdf() [2/2]

PerlinPlaneSdf::PerlinPlaneSdf ( const PerlinPlaneSdf a_inputIF)

Copy constructor.

Parameters
[in]a_inputIFOther plane

Member Function Documentation

◆ newImplicitFunction()

BaseIF * PerlinPlaneSdf::newImplicitFunction ( ) const
virtual

Factory method.

Returns
Returns new plane with same parameters.

◆ value()

Real PerlinPlaneSdf::value ( const RealVect &  a_pos) const
virtual

Value function.

Parameters
[in]a_posPosition

The documentation for this class was generated from the following files: