#include <RandomFaultsAlgorithm.h>
RandomFaultsAlgorithm::RandomFaultsAlgorithm |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
Initializes the attributes and allocates the memory for the terrain data.
- Parameters
-
[in] | width | Size of the terrain surface to generate in X-axis. |
[in] | height | Size of the terrain surface to generate in Y-axis. |
float * RandomFaultsAlgorithm::GenerateSurfaceByRandomFaults |
( |
int |
iterations, |
|
|
float |
faultValueMin, |
|
|
float |
faultValueMax |
|
) |
| |
Generates the terrain data according to the random faults generation algorithm.
[Based] on the random faults algorithm, described e.g. in Modern Computer Graphics, p.281
- Parameters
-
[in] | iterations | Number of iterations. |
[in] | faultValueMin | Lower boundary of the interval in which the fault value is generated. |
[in] | faultValueMax | Upper boundary of the interval in which the fault value is generated. |
- Returns
- Terrain surface data stored in one-dimensional array.
The documentation for this class was generated from the following files: