Blender
V2.93
source
blender
freestyle
intern
system
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
38
real
smoothNoise
(
real
x
);
39
real
linearNoise
(
real
x
);
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;
48
static
real
_values
[
NB_VALUE_NOISE
];
49
50
#ifdef WITH_CXX_GUARDEDALLOC
51
MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:PseudoNoise"
)
52
#endif
53
};
54
55
}
/* namespace Freestyle */
MEM_guardedalloc.h
Read Guarded memory(de)allocation.
Precision.h
Define the float precision used in the program.
seed
static unsigned long seed
Definition:
btSoftBody.h:39
Freestyle::PseudoNoise
Definition:
PseudoNoise.h:32
Freestyle::PseudoNoise::NB_VALUE_NOISE
static const unsigned NB_VALUE_NOISE
Definition:
PseudoNoise.h:47
Freestyle::PseudoNoise::smoothNoise
real smoothNoise(real x)
Definition:
PseudoNoise.cpp:72
Freestyle::PseudoNoise::turbulenceSmooth
real turbulenceSmooth(real x, unsigned nbOctave=8)
Definition:
PseudoNoise.cpp:96
Freestyle::PseudoNoise::linearNoise
real linearNoise(real x)
Definition:
PseudoNoise.cpp:52
Freestyle::PseudoNoise::_values
static real _values[NB_VALUE_NOISE]
Definition:
PseudoNoise.h:48
Freestyle::PseudoNoise::~PseudoNoise
virtual ~PseudoNoise()
Definition:
PseudoNoise.h:34
Freestyle::PseudoNoise::turbulenceLinear
real turbulenceLinear(real x, unsigned nbOctave=8)
Definition:
PseudoNoise.cpp:107
Freestyle::PseudoNoise::init
static void init(long seed)
Definition:
PseudoNoise.cpp:44
Freestyle
inherits from class Rep
Definition:
AppCanvas.cpp:32
Freestyle::x
static unsigned x[3]
Definition:
RandGen.cpp:87
Freestyle::real
double real
Definition:
Precision.h:26
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1