Blender  V2.93
PseudoNoise.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
17 #pragma once
18 
24 #include "Precision.h"
25 
26 #ifdef WITH_CXX_GUARDEDALLOC
27 # include "MEM_guardedalloc.h"
28 #endif
29 
30 namespace Freestyle {
31 
32 class PseudoNoise {
33  public:
34  virtual ~PseudoNoise()
35  {
36  }
37 
40 
41  real turbulenceSmooth(real x, unsigned nbOctave = 8);
42  real turbulenceLinear(real x, unsigned nbOctave = 8);
43 
44  static void init(long seed);
45 
46  protected:
47  static const unsigned NB_VALUE_NOISE = 512;
49 
50 #ifdef WITH_CXX_GUARDEDALLOC
51  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:PseudoNoise")
52 #endif
53 };
54 
55 } /* namespace Freestyle */
Read Guarded memory(de)allocation.
Define the float precision used in the program.
static unsigned long seed
Definition: btSoftBody.h:39
static const unsigned NB_VALUE_NOISE
Definition: PseudoNoise.h:47
real smoothNoise(real x)
Definition: PseudoNoise.cpp:72
real turbulenceSmooth(real x, unsigned nbOctave=8)
Definition: PseudoNoise.cpp:96
real linearNoise(real x)
Definition: PseudoNoise.cpp:52
static real _values[NB_VALUE_NOISE]
Definition: PseudoNoise.h:48
real turbulenceLinear(real x, unsigned nbOctave=8)
static void init(long seed)
Definition: PseudoNoise.cpp:44
inherits from class Rep
Definition: AppCanvas.cpp:32
static unsigned x[3]
Definition: RandGen.cpp:87
double real
Definition: Precision.h:26