2D Amortized Noise Performance Evaluator
A Program to Evaluate the Performance of Amortized Noise
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Macros
Pages
FiniteAmortizedNoise2D.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
CFiniteAmortizedNoise2D
{
26
private
:
//Perlin noise tables
27
float
g2
[
B
][2];
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
*
spline
;
41
42
float
getRandomUnitFloat
();
43
44
unsigned
int
h
(
const
unsigned
int
x);
45
unsigned
int
h
(
const
unsigned
int
x,
const
unsigned
int
y);
46
47
void
FillUp
(
float
* t,
const
float
s,
const
int
n);
48
void
FillDn
(
float
* t,
const
float
s,
const
int
n);
49
50
void
initEdgeTables
(
const
int
x,
const
int
y,
const
int
n);
51
void
initSplineTable
(
const
int
n);
52
53
float
getNoise
(
const
int
i,
const
int
j);
54
void
getNoise
(
const
int
n,
const
int
i0,
const
int
j0,
float
** cell);
55
void
addNoise
(
const
int
n,
const
int
i0,
const
int
j0,
const
float
scale,
float
** cell);
56
57
public
:
58
CFiniteAmortizedNoise2D
(
const
unsigned
n);
59
~CFiniteAmortizedNoise2D
();
60
float
generate
(
int
x,
int
y,
const
int
m0,
const
int
m1,
const
int
n,
float
** cell);
61
};
//CFiniteAmortizedNoise2D
Generated on Wed May 7 2014 19:37:20 for 2D Amortized Noise Performance Evaluator by
1.8.2