Skip to content

Class Engine::OpacityPlugin

ClassList > Engine > OpacityPlugin

  • #include <OpacityPlugin.hpp>

Inherits the following classes: Engine::IPlugin

Public Functions

Type Name
virtual void Init (Registry & registry) override
Initializes the plugin, registering components and systems.

Public Functions inherited from Engine::IPlugin

See Engine::IPlugin

Type Name
virtual void Init (Registry & registry) = 0
Initializes the plugin, registering components and systems.
virtual ~IPlugin () = default

Public Static Functions

Type Name
void AttachToEntity (Registry & registry, Entity entity, float alpha=1.0f, bool inheritToChildren=true)
float GetEffectiveAlpha (Registry & registry, Entity entity)
Computes the render alpha for an entity: its own Opacity times every ancestor'sOpacity whose inheritToChildren flag is set. Returns 1.0 when the entity has noOpacity . Depth-capped so hand-built parent cycles terminate.

Public Functions Documentation

function Init

Initializes the plugin, registering components and systems.

virtual void Engine::OpacityPlugin::Init (
    Registry & registry
) override

Parameters:

  • registry A reference to the main ECS registry.

Implements Engine::IPlugin::Init


Public Static Functions Documentation

function AttachToEntity

static void Engine::OpacityPlugin::AttachToEntity (
    Registry & registry,
    Entity entity,
    float alpha=1.0f,
    bool inheritToChildren=true
) 

function GetEffectiveAlpha

Computes the render alpha for an entity: its own Opacity times every ancestor'sOpacity whose inheritToChildren flag is set. Returns 1.0 when the entity has noOpacity . Depth-capped so hand-built parent cycles terminate.

static float Engine::OpacityPlugin::GetEffectiveAlpha (
    Registry & registry,
    Entity entity
) 



The documentation for this class was generated from the following file /home/runner/work/r-type/r-type/Engine/include/Plugins/OpacityPlugin.hpp