Tiled 3D Amortized Noise
A Program to Generate Infinite3D Grayscale Noise Textures with Amortized Noise
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Macros
Pages
FiniteAmortizedNoise3D.h
Go to the documentation of this file.
1
2
3
4
5
6
7
8
9
10
11
12
15
16
#pragma once
17
18
#include "
Common.h
"
19
24
25
class
CFiniteAmortizedNoise3D
{
26
private
:
//Perlin noise tables
27
float
g3
[
B
][3];
28
int
p
[
B
];
29
void
initPerlinNoiseTables
();
30
31
private
:
//Amortized noise stuff
32
float
*
uax
;
33
float
*
vax
;
34
float
*
ubx
;
35
float
*
vbx
;
36
float
*
uay
;
37
float
*
vay
;
38
float
*
uby
;
39
float
*
vby
;
40
float
*
ucx
;
41
float
*
vcx
;
42
float
*
udx
;
43
float
*
vdx
;
44
float
*
ucy
;
45
float
*
vcy
;
46
float
*
udy
;
47
float
*
vdy
;
48
float
*
uaz
;
49
float
*
vaz
;
50
float
*
ubz
;
51
float
*
vbz
;
52
float
*
ucz
;
53
float
*
vcz
;
54
float
*
udz
;
55
float
*
vdz
;
56
float
*
spline
;
57
58
float
getRandomUnitFloat
();
59
60
unsigned
int
h
(
const
unsigned
int
x);
61
unsigned
int
h
(
const
unsigned
int
x,
const
unsigned
int
y,
const
unsigned
int
z);
62
63
void
FillUp
(
float
* t,
float
s,
int
n);
64
void
FillDn
(
float
* t,
float
s,
int
n);
65
66
float
getNoise
(
const
int
i,
const
int
j,
const
int
k);
67
void
getNoise
(
const
int
n,
const
int
i0,
const
int
j0,
68
const
int
k0,
float
*** cell);
69
void
addNoise
(
const
int
n,
const
int
i0,
const
int
j0,
70
const
int
k0,
float
scale,
float
*** cell);
71
72
void
initSplineTable
(
const
int
n);
73
void
initEdgeTables
(
const
int
x,
const
int
y,
const
int
z,
const
int
n);
74
75
public
:
76
CFiniteAmortizedNoise3D
(
const
int
n);
77
~CFiniteAmortizedNoise3D
();
78
float
generate
(
int
x,
int
y,
int
z,
const
int
m0,
const
int
m1,
int
n,
float
*** cell);
79
};
//CFiniteAmortizedNoise3D
Generated on Wed May 7 2014 19:41:09 for Tiled 3D Amortized Noise by
1.8.2