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

Builds the scene's sea (findOcean's pick) once a tick and once a frame, and publishes it as FrameContext::ocean, for gameplay, the cull and the renderer alike. More...

#include <ocean_system.h>

Inheritance diagram for Vkm::Engine::OceanSystem:
Vkm::Engine::System

Public Member Functions

void update (FrameContext &ctx) override
 Execute this system for the current frame.
void fixedUpdate (FrameContext &ctx) override
 Execute this system at the fixed simulation rate.
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.

Detailed Description

Builds the scene's sea (findOcean's pick) once a tick and once a frame, and publishes it as FrameContext::ocean, for gameplay, the cull and the renderer alike.

At the moment NetSession::worldTime gives: inside a tick, on the authority, that tick's own, so what a tick floats on it floats the same way every time; in the frame, the moment drawn. At Simulation, registered ahead of BehaviorSystem, so a behavior's ocean() is this tick's or this frame's sea. Not replayed: a replayed tick sees the sea the last one built.

Member Function Documentation

◆ update()

void Vkm::Engine::OceanSystem::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.

◆ fixedUpdate()

void Vkm::Engine::OceanSystem::fixedUpdate ( FrameContext & ctx)
overridevirtual

Execute this system at the fixed simulation rate.

Called 0+ times per frame; the step is ctx.clock.getFixedStep().

Runs before any producer stage, so ctx.visibility and ctx.ui are null here. ctx.poses is set by SkeletalAnimationSystem's own fixedUpdate, so a later Simulation system reads this tick's pose.

Parameters
ctxThis frame's services; see above for which products are set.

Reimplemented from Vkm::Engine::System.


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