Shapes 3D  3.0
 All Classes Functions Variables Pages
shapes3d.utils.HeightmapOSN Class Reference
Inheritance diagram for shapes3d.utils.HeightmapOSN:

Public Member Functions

 HeightmapOSN (int size, double rad_factor, double noise_scale)
 
 HeightmapOSN (int size)
 
- Public Member Functions inherited from shapes3d.utils.Heightmap
 Heightmap (int size)
 
PImage getMapImage (PApplet app)
 
float[][] grid ()
 
int gridSize ()
 
float minHeight ()
 
float maxHeight ()
 
void adjustHeights (float low, float high)
 
void printMap ()
 

Protected Member Functions

void calcHeightmap ()
 

Protected Attributes

OpenSimplexNoise noise = null
 
double fNoiseScale
 
double fRds
 
- Protected Attributes inherited from shapes3d.utils.Heightmap
float[][] grid
 
int gridSize
 
float min_height = Float.MAX_VALUE
 
float max_height = Float.MIN_VALUE
 

Constructor & Destructor Documentation

shapes3d.utils.HeightmapOSN.HeightmapOSN ( int  size,
double  rad_factor,
double  noise_scale 
)

Create a square tileable heightmap using Open Simplex noise.

A 2D float array is used to hold the height map values. The amount of RAM needed to store the array is 4*size*size bytes so a map size of 1000 would require about 4Mb.

rad_factors in the range 500 - 1000 (default = 500) and noise_scale values in the range 0.002 - 0.008 (default = 0.005)

Parameters
sizethe size of the 2D square array
rad_factortry values 500 - 1000
noise_scaletry values 0.002 - 0.008
shapes3d.utils.HeightmapOSN.HeightmapOSN ( int  size)

Create a square tileable heightmap using Open Simplex noise.

Parameters
sizethe size of the 2D square array

The documentation for this class was generated from the following file: