vkmEngine 1.0.15
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::TerrainSystem Class Reference

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>

Inheritance diagram for Vkm::Engine::TerrainSystem:
Vkm::Engine::System

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.

Detailed Description

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.

Member Function Documentation

◆ update()

void Vkm::Engine::TerrainSystem::update ( FrameContext & ctx)
overridevirtual

Execute this system for the current frame.

Parameters
ctxThis frame's services and the products published so far.

Reimplemented from Vkm::Engine::System.


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