![]() |
vkmEngine 1.0.15
A C++ game engine · vkmengine.com
|
Makes each Terrain's meshes, layer weights and layered material from its asset, scatters its plants, and publishes where its chunks and plants lie as FrameContext::terrain, for the cull to list. More...
#include <terrain_system.h>
Public Member Functions | |
| void | update (FrameContext &ctx) override |
| Execute this system for the current frame. | |
| Public Member Functions inherited from Vkm::Engine::System | |
| virtual bool | isReplayed () const |
| Whether this system may be re-run over a tick that already happened. | |
| virtual void | init (FrameContext &ctx) |
| Called once after all systems are registered, before the first update. | |
| virtual void | shutdown () |
| Called once on engine shutdown. | |
| virtual void | fixedUpdate (FrameContext &ctx) |
| Execute this system at the fixed simulation rate. | |
Makes each Terrain's meshes, layer weights and layered material from its asset, scatters its plants, and publishes where its chunks and plants lie as FrameContext::terrain, for the cull to list.
What it makes are private assets (ResourceManager::addPrivate), derived and never saved: the asset is the terrain. Remade when the asset's version moves - a brush stroke - each chunk only where the heights it is built from changed, and the weights only when they did. At Transform, after HierarchySystem, so a terrain under a parent lies where the parent does this frame.
|
overridevirtual |
Execute this system for the current frame.
| ctx | This frame's services and the products published so far. |
Reimplemented from Vkm::Engine::System.