Class Engine::LayeredRenderSystem¶
ClassList > Engine > LayeredRenderSystem
A system that draws entities one at a time, so RenderScene can mix them with the entities of other layered systems, sorted byPosition::z .More...
#include <LayeredRenderSystem.hpp>
Inherits the following classes: Engine::System
Inherited by the following classes: Engine::AnimationSystem, Engine::ShapeSystem, Engine::SpriteSystem, Engine::TextSystem
Public Attributes inherited from Engine::System¶
See Engine::System
| Type | Name |
|---|---|
| std::set< Entity > | m_Entities |
Public Functions¶
| Type | Name |
|---|---|
| virtual bool | CanDraw (Registry & registry, Entity entity, bool screenSpace) = 0 Whether this system draws entity in the given pass. |
| virtual void | DrawEntity (Registry & registry, Entity entity) = 0 Draws a single entity. Only called when CanDraw returned true. |
Public Functions inherited from Engine::System¶
See Engine::System
| Type | Name |
|---|---|
| virtual void | OnSceneUnloaded (Registry & registry) Called right before the current scene's entities are destroyed. |
| virtual void | Render (Registry & registry) World pass: drawn inside the active camera. |
| virtual void | RenderScreen (Registry & registry) Screen pass: drawn after the world, in window pixels. |
| virtual void | Update (Registry & registry, float dt) |
| virtual | ~System () = default |
Detailed Description¶
Within a pass, entities are drawn by ascending z, then by system registration order, then by entity id.
Public Functions Documentation¶
function CanDraw¶
Whether this system draws entity in the given pass.
virtual bool Engine::LayeredRenderSystem::CanDraw (
Registry & registry,
Entity entity,
bool screenSpace
) = 0
Parameters:
registryThe ECS registry.entityThe entity to check (it always has a Position).screenSpaceTrue for the screen (HUD) pass, false for the world pass.
function DrawEntity¶
Draws a single entity. Only called when CanDraw returned true.
Parameters:
registryThe ECS registry.entityThe entity to draw.
The documentation for this class was generated from the following file /home/runner/work/r-type/r-type/Engine/include/ECS/LayeredRenderSystem.hpp