![]() |
vkmEngine 1.0.15
A C++ game engine · vkmengine.com
|
Where a terrain's plants stand: each grid square grows as many of a layer's plants as the density painted at its corners asks, placed, turned and sized by a hash of the square and the layer's seed. More...
Classes | |
| struct | Plant |
| One plant: which layer, and where in the terrain it stands. More... | |
Functions | |
| void | scatter (const TerrainAsset &terrain, std::vector< Plant > &out) |
Every plant terrain grows. | |
Variables | |
| constexpr uint32_t | MAX_PER_SQUARE = 64 |
| The most plants one grid square grows of one layer, whatever its density asks. | |
Where a terrain's plants stand: each grid square grows as many of a layer's plants as the density painted at its corners asks, placed, turned and sized by a hash of the square and the layer's seed.
A function of the asset alone, so every end of a networked game and every load grows the same plants, and a stroke moves only those where it painted.
| void Vkm::Engine::TerrainPlants::scatter | ( | const TerrainAsset & | terrain, |
| std::vector< Plant > & | out ) |
Every plant terrain grows.
| terrain | The terrain; a layer with no density map grows none. | |
| [out] | out | Replaced with them, layer by layer, row by row. |