chombo-discharge
CD_PerlinPlaneSdf.H
Go to the documentation of this file.
1 /* chombo-discharge
2  * Copyright © 2021 SINTEF Energy Research.
3  * Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
4  */
5 
12 #ifndef CD_PerlinPlaneSdf_H
13 #define CD_PerlinPlaneSdf_H
14 
15 // Chombo includes
16 #include <BaseIF.H>
17 
18 // Our includes
19 #include "CD_NamespaceHeader.H"
20 
24 class PerlinPlaneSdf : public BaseIF
25 {
26 public:
39  PerlinPlaneSdf(const RealVect a_normal,
40  const RealVect a_point,
41  const bool a_inside,
42  const Real a_noiseAmp,
43  const RealVect a_noiseFreq,
44  const Real a_persistence,
45  const int a_octaves,
46  const bool a_reseed = false);
51  PerlinPlaneSdf(const PerlinPlaneSdf& a_inputIF);
52 
56  virtual ~PerlinPlaneSdf();
57 
62  virtual Real
63  value(const RealVect& a_pos) const;
64 
69  virtual BaseIF*
70  newImplicitFunction() const;
71 
72 protected:
76  RealVect m_normal;
77 
81  RealVect m_point;
82 
86  RefCountedPtr<BaseIF> m_plane;
87 
91  RefCountedPtr<BaseIF> m_perlin;
92 };
93 
94 #include <CD_NamespaceFooter.H>
95 
96 #endif
Infinite plane with surface noise (Perlin noise).
Definition: CD_PerlinPlaneSdf.H:25
RealVect m_point
Plane point.
Definition: CD_PerlinPlaneSdf.H:81
RealVect m_normal
Plane normal.
Definition: CD_PerlinPlaneSdf.H:76
RefCountedPtr< BaseIF > m_perlin
Noise function.
Definition: CD_PerlinPlaneSdf.H:91
virtual ~PerlinPlaneSdf()
Destructor (does nothing)
Definition: CD_PerlinPlaneSdf.cpp:52
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.
Definition: CD_PerlinPlaneSdf.cpp:21
RefCountedPtr< BaseIF > m_plane
BaseIF function for a plane without noise.
Definition: CD_PerlinPlaneSdf.H:86
virtual Real value(const RealVect &a_pos) const
Value function.
Definition: CD_PerlinPlaneSdf.cpp:56
virtual BaseIF * newImplicitFunction() const
Factory method.
Definition: CD_PerlinPlaneSdf.cpp:68