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

Noisy sphere geometry (with Perlin noise). More...

#include <CD_PerlinSphereSdf.H>

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

Public Member Functions

 PerlinSphereSdf ()
 No weak construction.
 
 PerlinSphereSdf (const Real &a_rad, const RealVect &a_center, 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)
 Constructor. More...
 
 PerlinSphereSdf (const PerlinSphereSdf &a_inputIF)
 Copy constructor. More...
 
virtual ~PerlinSphereSdf ()
 Destructor (does nothing)
 
virtual Real value (const RealVect &a_pos) const
 Value function. Returns distance to object. More...
 
virtual BaseIF * newImplicitFunction () const
 Factory function.
 

Protected Attributes

Real m_rad
 Radius.
 
RealVect m_center
 Center.
 
bool m_inside
 Inside/outside.
 
RefCountedPtr< BaseIF > m_perlinIF
 Noise function.
 

Detailed Description

Noisy sphere geometry (with Perlin noise).

Constructor & Destructor Documentation

◆ PerlinSphereSdf() [1/2]

PerlinSphereSdf::PerlinSphereSdf ( const Real &  a_rad,
const RealVect &  a_center,
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 
)

Constructor.

Parameters
[in]a_radSphere radius
[in]a_centerSphere center
[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.

◆ PerlinSphereSdf() [2/2]

PerlinSphereSdf::PerlinSphereSdf ( const PerlinSphereSdf a_inputIF)

Copy constructor.

Parameters
[in]a_inputIFOther perlin sphere

Member Function Documentation

◆ value()

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

Value function. Returns distance to object.

Parameters
[in]a_posPosition

Reimplemented in PerlinRodSdf, and GradedPerlinSphereSdf.


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