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

Implicit function class describing a slab (box) with surface noise on the top. More...

#include <CD_PerlinSlabSdf.H>

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

Public Member Functions

 PerlinSlabSdf ()=delete
 No weak constructor allowed, use the full constructor.
 
 PerlinSlabSdf (const RealVect a_ccPoint, const RealVect a_normal, const RealVect a_xyz, const RealVect a_noiseFreq, const int a_octaves, const Real a_noiseAmp, const Real a_persistence, const Real a_cornerCurv, const bool a_reseed, const bool a_fluidInside)
 Constructor. More...
 
 PerlinSlabSdf (const PerlinSlabSdf &a_inputIF)
 Copy constructor. Copies over implicit function.
 
virtual ~PerlinSlabSdf ()
 Destructor (does nothing)
 
virtual Real value (const RealVect &a_pos) const override
 Value function. Returns distance to object. More...
 
virtual BaseIF * newImplicitFunction () const override
 Factory function.
 

Protected Attributes

RefCountedPtr< BaseIF > m_baseif
 Implicit function. This is a union between cutting planes and a perlin plane.
 
bool m_fluidInside
 Fluid on inside or not.
 

Detailed Description

Implicit function class describing a slab (box) with surface noise on the top.

Constructor & Destructor Documentation

◆ PerlinSlabSdf()

PerlinSlabSdf::PerlinSlabSdf ( const RealVect  a_ccPoint,
const RealVect  a_normal,
const RealVect  a_xyz,
const RealVect  a_noiseFreq,
const int  a_octaves,
const Real  a_noiseAmp,
const Real  a_persistence,
const Real  a_cornerCurv,
const bool  a_reseed,
const bool  a_fluidInside 
)

Constructor.

Parameters
[in]a_ccPointCenter point on the slab side with surface noise
[in]a_normalNormal vector of slab side with surface noise
[in]a_xyzWidth, depth, and height of slab
[in]a_curvCorner curvatures
[in]a_noiseFreqNoise frequency
[in]a_octavesNumber of octaves
[in]a_noiseAmpNoise amplitude
[in]a_persistenceFactor for noise octaves.
[in]a_cornerCurvCorner curvatures
[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.
Parameters
[in]a_fluidInsideFluid on inside or not

Member Function Documentation

◆ value()

Real PerlinSlabSdf::value ( const RealVect &  a_pos) const
overridevirtual

Value function. Returns distance to object.

Parameters
[in]a_posPosition.

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