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
InfiniteAmortizedNoise3D.h
Go to the documentation of this file.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#pragma once
17
18
#include "
Common.h
"
19
24
25
class
CInfiniteAmortizedNoise3D
{
26
private
:
//Amortized noise stuff
27
float
*
uax
;
28
float
*
vax
;
29
float
*
ubx
;
30
float
*
vbx
;
31
float
*
uay
;
32
float
*
vay
;
33
float
*
uby
;
34
float
*
vby
;
35
float
*
ucx
;
36
float
*
vcx
;
37
float
*
udx
;
38
float
*
vdx
;
39
float
*
ucy
;
40
float
*
vcy
;
41
float
*
udy
;
42
float
*
vdy
;
43
float
*
uaz
;
44
float
*
vaz
;
45
float
*
ubz
;
46
float
*
vbz
;
47
float
*
ucz
;
48
float
*
vcz
;
49
float
*
udz
;
50
float
*
vdz
;
51
float
*
spline
;
52
unsigned
int
seed
;
53
54
float
getRandomUnitFloat
();
55
56
float
h1
(
const
unsigned
int
x,
const
unsigned
int
y,
const
unsigned
int
z);
57
float
h2
(
const
unsigned
int
x,
const
unsigned
int
y,
const
unsigned
int
z);
58
59
void
FillUp
(
float
* t,
float
s,
int
n);
60
void
FillDn
(
float
* t,
float
s,
int
n);
61
62
float
getNoise
(
const
int
i,
const
int
j,
const
int
k);
63
void
getNoise
(
const
int
n,
const
int
i0,
const
int
j0,
64
const
int
k0,
float
*** cell);
65
void
addNoise
(
const
int
n,
const
int
i0,
const
int
j0,
66
const
int
k0,
float
scale,
float
*** cell);
67
68
void
initSplineTable
(
const
int
n);
69
void
initEdgeTables
(
const
int
x,
const
int
y,
const
int
z,
const
int
n);
70
71
public
:
72
CInfiniteAmortizedNoise3D
(
const
int
n,
const
int
s);
73
~CInfiniteAmortizedNoise3D
();
74
float
generate
(
int
x,
int
y,
int
z,
const
int
m0,
const
int
m1,
int
n,
float
*** cell);
75
};
//CInfiniteAmortizedNoise3D
Generated on Wed May 7 2014 19:41:09 for Tiled 3D Amortized Noise by
1.8.2