Blender  V3.3
Noise.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #pragma once
4 
10 #include "Geom.h"
11 
12 #include "../system/FreestyleConfig.h"
13 
14 #ifdef WITH_CXX_GUARDEDALLOC
15 # include "MEM_guardedalloc.h"
16 #endif
17 
18 using namespace std;
19 
20 namespace Freestyle {
21 
22 #define _NOISE_B 0x100
23 
24 using namespace Geometry;
25 
27 class Noise {
28  public:
30  Noise(long seed = -1);
31 
34  {
35  }
36 
38  float turbulence1(float arg, float freq, float amp, unsigned oct = 4);
39 
41  float turbulence2(Vec2f &v, float freq, float amp, unsigned oct = 4);
42 
44  float turbulence3(Vec3f &v, float freq, float amp, unsigned 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 */
Vectors and Matrices (useful type definitions)
Read Guarded memory(de)allocation.
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between and object coordinate space Combine Create a color from its and value channels Color Retrieve a color or the default fallback if none is specified Separate Split a vector into its and Z components Generates normals with round corners and may slow down renders Vector Displace the surface along an arbitrary direction White Noise
#define _NOISE_B
Definition: Noise.h:22
ATTR_WARN_UNUSED_RESULT const BMVert * v
static unsigned long seed
Definition: btSoftBody.h:39
inherits from class Rep
Definition: AppCanvas.cpp:18