2D Amortized Noise Performance Evaluator
A Program to Evaluate the Performance of Amortized Noise
 All Classes Files Functions Variables Macros Pages
Functions | Variables
Main.cpp File Reference

Main. More...

#include "defines.h"
#include <stdlib.h>
#include <stdio.h>
#include "FiniteAmortizedNoise2D.h"
#include "InfiniteAmortizedNoise2D.h"
#include "perlin.h"
#include "infiniteperlin.h"
#include "infinitesmoothperlin.h"
#include "CPUtime.h"

Functions

unsigned int Time2DImprovedAmortizedNoise (float **cell, int octave0, int octave1, int size, int repeats)
 
unsigned int Time2DAmortizedNoise (float **cell, int octave0, int octave1, int size, int repeats)
 
unsigned int Time2DPerlinNoise (float **cell, int octave0, int octave1, int size, int repeats, float(*noise)(float, float, float, float, int))
 
void TestPerlinNoiseVariants ()
 Time 2D Perlin noise against infinite and infinite smooth Perlin noise.
 
void TestAmortizedNoiseVariants ()
 Time 2D Perlin noise against finite and infinite amortized noise.
 
int main (int argc, char *argv[])
 

Variables

const int MAXCELLSIZE2D = 8192
 Maximum cell size, MUST be a power of 2.
 
CFiniteAmortizedNoise2D FiniteAmortizedNoise (MAXCELLSIZE2D)
 Amortized 2D Perlin noise generator.
 
CInfiniteAmortizedNoise2D InfiniteAmortizedNoise (MAXCELLSIZE2D, 0)
 Amortized 2D noise generator.
 

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Main.

Parameters
argcArgument count
argvArguments.
Returns
0 for success, 1 for failure.
unsigned int Time2DAmortizedNoise ( float **  cell,
int  octave0,
int  octave1,
int  size,
int  repeats 
)

Time a random cell of 2D Amortized Perlin noise.

Parameters
cellPointer to array in which to store the noise.
octave0Smallest octave.
octave1Largest octave.
sizeTexture size.
repeatsNumber of times to repeat the experiment.
Returns
CPU time in milliseconds.
unsigned int Time2DImprovedAmortizedNoise ( float **  cell,
int  octave0,
int  octave1,
int  size,
int  repeats 
)

Time a random cell of 2D Amortized noise.

Parameters
cellPointer to array in which to store the noise.
octave0Smallest octave.
octave1Largest octave.
sizeTexture size.
repeatsNumber of times to repeat the experiment.
Returns
CPU time in milliseconds.
unsigned int Time2DPerlinNoise ( float **  cell,
int  octave0,
int  octave1,
int  size,
int  repeats,
float(*)(float, float, float, float, int)  noise 
)

Time a random cell of 2D Perlin noise.

Parameters
cellPointer to array in which to store the noise.
octave0Smallest octave.
octave1Largest octave.
sizeTexture size.
repeatsNumber of times to repeat the experiment.
noiseNoise function to be timed, will be either vanilla, infinite, or infinite smoothed Perlin noise.
Returns
CPU time in milliseconds.