One layer of an elevation map (heightmap). A VoxelFarm terrains starts with an elevation map. This map is a sum of the contributions of multiple height layers. Each biome can specify a different height layer. More...
#include <Biome.h>
Public Member Functions | |
| CHeightLayer (ITileSet *tileSet, int tilePeriod, double tileAmplitude, int noiseType, double noiseAmplitude, double noiseFreq, double noiseStep, double noiseLacunarity, int noiseOctaves) | |
| Constructs a HeightLayer object. More... | |
| double | getHeight (double x, double z) |
| Returns the height for the provided point in the XZ plane as a double precision. This method will perform interpolation, providing smoother results. | |
| double | getHeight (double x, double z, double &noiseHeight, double &tileHeight, double &tileHeightMinFiltered, double &tileHeightMaxFiltered) |
| Returns the height for the provided point in the XZ plane as a double precision. Also returns the noise and tile height components. This method will perform interpolation, providing smoother results. | |
| unsigned int | getHeight (int x, int z) |
| Returns the height for the provided point in the XZ plane as an integer. This will not perfom any interpolation. Use this function if smoothness is not important. | |
Public Attributes | |
| ITileSet * | tileSet |
| int | tilePeriod |
| double | tileAmplitude |
| int | noiseType |
| double | noiseAmplitude |
| double | noiseFreq |
| double | noiseStep |
| double | noiseLacunarity |
| int | noiseOctaves |
One layer of an elevation map (heightmap). A VoxelFarm terrains starts with an elevation map. This map is a sum of the contributions of multiple height layers. Each biome can specify a different height layer.
| VoxelFarm::CHeightLayer::CHeightLayer | ( | ITileSet * | tileSet, |
| int | tilePeriod, | ||
| double | tileAmplitude, | ||
| int | noiseType, | ||
| double | noiseAmplitude, | ||
| double | noiseFreq, | ||
| double | noiseStep, | ||
| double | noiseLacunarity, | ||
| int | noiseOctaves | ||
| ) |
Constructs a HeightLayer object.
| tileSet | A TileSet object to be used for adding detail to the height layer |
| tilePeriod | Period at which the tileset will be applied |
| tileAmplitude | Multiplier factor for the height component returned by the tileset |
| noiseType | Type of base noise. Only 0 (Perlin) is currently supported |
| noiseAmplitude | Height for the base noise |
| noiseFreq | Frequency of the base noise |
| noiseStep | Amplitude increment for each octave of the base noise |
| noiseLacunarity | Frequency increment for each octave of the base noise |
| noiseOctaves | Number of octaves in the base noise |