Blender V5.0
Noise.cpp File Reference

Class to define Perlin noise. More...

#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include "BLI_compiler_attrs.h"
#include "BLI_rand.h"
#include "BLI_sys_types.h"
#include "Noise.h"

Go to the source code of this file.

Namespaces

namespace  Freestyle
 inherits from class Rep

Macros

#define SCURVE(a)
#define BM   0xff
#define N   0x1000
#define LERP(t, a, b)
#define SETUP(i, b0, b1, r0, r1)
#define AT2(rx, ry)
#define AT3(rx, ry, rz)

Functions

static void Freestyle::normalize2 (float v[2])
static void Freestyle::normalize3 (float v[3])

Detailed Description

Class to define Perlin noise.

Definition in file Noise.cpp.

Macro Definition Documentation

◆ AT2

#define AT2 ( rx,
ry )
Value:
((rx) * q[0] + (ry) * q[1])

Referenced by Freestyle::Noise::smoothNoise2().

◆ AT3

#define AT3 ( rx,
ry,
rz )
Value:
((rx) * q[0] + (ry) * q[1] + (rz) * q[2])

Referenced by Freestyle::Noise::smoothNoise3().

◆ BM

#define BM   0xff

Definition at line 38 of file Noise.cpp.

◆ LERP

#define LERP ( t,
a,
b )

◆ N

#define N   0x1000

Definition at line 39 of file Noise.cpp.

◆ SCURVE

#define SCURVE ( a)
Value:
((a) * (a) * (3.0 - 2.0 * (a)))

Definition at line 23 of file Noise.cpp.

Referenced by Freestyle::Noise::smoothNoise1(), Freestyle::Noise::smoothNoise2(), and Freestyle::Noise::smoothNoise3().

◆ SETUP

#define SETUP ( i,
b0,
b1,
r0,
r1 )
Value:
{ \
(t) = (i) + (N); \
(r0) = modff((t), &(u)); \
(r1) = (r0) - 1.0; \
(b0) = int(u) & BM; \
(b1) = ((b0) + 1) & BM; \
} \
(void)0
#define BM
Definition Noise.cpp:38
#define N
i
Definition text_draw.cc:230

Definition at line 47 of file Noise.cpp.