8 static double noise3D(
double px,
double py,
double pz);
9 static double fractal3D(
double px,
double py,
double pz,
double step,
double lacunarity,
int octaves);
11 static const int DIM_SAMPLES = 16;
12 static const int MAX_SAMPLES = DIM_SAMPLES*DIM_SAMPLES*DIM_SAMPLES;
13 static const double samples[MAX_SAMPLES];
14 static double getPointInSample(
int x,
int y,
int z)
16 x = (x < DIM_SAMPLES)? x : (x - DIM_SAMPLES);
17 y = (y < DIM_SAMPLES)? y : (y - DIM_SAMPLES);
18 z = (z < DIM_SAMPLES)? z : (z - DIM_SAMPLES);
19 int sampleIndex = z*DIM_SAMPLES*DIM_SAMPLES + y*DIM_SAMPLES + x;
20 return samples[sampleIndex];
Contains all classes and functions for the VoxelFarm engine.