Blender
V4.3
source
blender
freestyle
intern
geometry
Noise.h
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2023 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
12
#include "
Geom.h
"
13
14
#include "
../system/FreestyleConfig.h
"
15
16
#ifdef WITH_CXX_GUARDEDALLOC
17
# include "
MEM_guardedalloc.h
"
18
#endif
19
20
using namespace
std;
21
22
namespace
Freestyle
{
23
24
#define _NOISE_B 0x100
25
26
using namespace
Geometry
;
27
29
class
Noise
{
30
public
:
32
Noise
(
long
seed
= -1);
33
35
~Noise
() {}
36
38
float
turbulence1
(
float
arg,
float
freq,
float
amp,
uint
oct = 4);
39
41
float
turbulence2
(
Vec2f
&
v
,
float
freq,
float
amp,
uint
oct = 4);
42
44
float
turbulence3
(
Vec3f
&
v
,
float
freq,
float
amp,
uint
oct = 4);
45
47
float
smoothNoise1
(
float
arg);
48
50
float
smoothNoise2
(
Vec2f
&vec);
51
53
float
smoothNoise3
(
Vec3f
&vec);
54
55
private
:
56
int
p[
_NOISE_B
+
_NOISE_B
+ 2];
57
float
g3[
_NOISE_B
+
_NOISE_B
+ 2][3];
58
float
g2[
_NOISE_B
+
_NOISE_B
+ 2][2];
59
float
g1[
_NOISE_B
+
_NOISE_B
+ 2];
60
/* UNUSED */
61
// int start;
62
63
#ifdef WITH_CXX_GUARDEDALLOC
64
MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:Noise"
)
65
#endif
66
};
67
68
}
/* namespace Freestyle */
uint
unsigned int uint
Definition
BLI_sys_types.h:68
FreestyleConfig.h
Configuration definitions.
Geom.h
Vectors and Matrices (useful type definitions)
MEM_guardedalloc.h
Read Guarded memory(de)allocation.
_NOISE_B
#define _NOISE_B
Definition
Noise.h:24
v
ATTR_WARN_UNUSED_RESULT const BMVert * v
Definition
bmesh_query_inline.hh:17
seed
static unsigned long seed
Definition
btSoftBody.h:39
Freestyle::Noise
Definition
Noise.h:29
Freestyle::Noise::~Noise
~Noise()
Definition
Noise.h:35
Freestyle::Noise::turbulence3
float turbulence3(Vec3f &v, float freq, float amp, uint oct=4)
Definition
Noise.cpp:101
Freestyle::Noise::turbulence1
float turbulence1(float arg, float freq, float amp, uint oct=4)
Definition
Noise.cpp:76
Freestyle::Noise::turbulence2
float turbulence2(Vec2f &v, float freq, float amp, uint oct=4)
Definition
Noise.cpp:88
Freestyle::Noise::smoothNoise3
float smoothNoise3(Vec3f &vec)
Definition
Noise.cpp:171
Freestyle::Noise::smoothNoise1
float smoothNoise1(float arg)
Definition
Noise.cpp:116
Freestyle::Noise::smoothNoise2
float smoothNoise2(Vec2f &vec)
Definition
Noise.cpp:132
Freestyle::VecMat::Vec2< float >
Freestyle::VecMat::Vec3< float >
Geometry
Definition
scene/geometry.h:70
Freestyle
inherits from class Rep
Definition
AppCanvas.cpp:20
Noise
Noise
Definition
node_texture_proc.cc:277
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0