Blender  V3.3
PseudoNoise.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #pragma once
4 
10 #include "Precision.h"
11 
12 #ifdef WITH_CXX_GUARDEDALLOC
13 # include "MEM_guardedalloc.h"
14 #endif
15 
16 namespace Freestyle {
17 
18 class PseudoNoise {
19  public:
20  virtual ~PseudoNoise()
21  {
22  }
23 
26 
27  real turbulenceSmooth(real x, unsigned nbOctave = 8);
28  real turbulenceLinear(real x, unsigned nbOctave = 8);
29 
30  static void init(long seed);
31 
32  protected:
33  static const unsigned NB_VALUE_NOISE = 512;
35 
36 #ifdef WITH_CXX_GUARDEDALLOC
37  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:PseudoNoise")
38 #endif
39 };
40 
41 } /* 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:33
real smoothNoise(real x)
Definition: PseudoNoise.cpp:58
real turbulenceSmooth(real x, unsigned nbOctave=8)
Definition: PseudoNoise.cpp:82
real linearNoise(real x)
Definition: PseudoNoise.cpp:38
static real _values[NB_VALUE_NOISE]
Definition: PseudoNoise.h:34
real turbulenceLinear(real x, unsigned nbOctave=8)
Definition: PseudoNoise.cpp:93
static void init(long seed)
Definition: PseudoNoise.cpp:30
inherits from class Rep
Definition: AppCanvas.cpp:18
static unsigned x[3]
Definition: RandGen.cpp:73
double real
Definition: Precision.h:12