NAP
Public Attributes | List of all members
RenderFaderComponent Class Reference

#include <renderfadercomponent.h>

Public Attributes

float mFadeDuration = 2.0f
 Property: 'FadeDuration' Duration of the fade transition in seconds. More...
 
RGBColorFloat mFadeColor = { 0.0f, 0.0f, 0.0f }
 Property: 'FadeColor' Fade color. More...
 
bool mFadeIn = true
 Property: 'FadeIn' Whether to fade in from 'FadeColor' on startup. More...
 
- Public Attributes inherited from RenderableComponent
bool mVisible = true
 Property: 'Visible' if this object is rendered to target by the render service. More...
 
ResourcePtr< RenderLayermLayer
 Property: 'Layer' the render layer assigned to this component. More...
 
std::vector< ResourcePtr< RenderTag > > mTags
 Property: 'Tags' List of tags specifying the category this render component belongs to. More...
 
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Additional Inherited Members

- Public Member Functions inherited from Component
virtual void getDependentComponents (std::vector< rtti::TypeInfo > &components) const
 
virtual const rtti::TypeInfo getInstanceType () const =0
 
- Public Member Functions inherited from Resource
 Resource ()
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual bool init (utility::ErrorState &errorState)
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 
- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 

Description

Resource part of RenderFaderComponent

Renders a alpha-blended full-screen triangle in front of all previously rendered objects. Uses a nap::EmptyMesh internally to avoid using buffers. The FadedIn and FadedOut signals can be used to hook up any user callbacks in response to changes of transition states.

Ensure this component is excluded from shadow rendering passes using render tags, and is rendered last (on top of previously rendered objects) using render layers. When setup this way, the component can be rendered without a depth buffer: EDepthMode::NoReadWrite.

Inheritance diagram for RenderFaderComponent:
[legend]
Collaboration diagram for RenderFaderComponent:
[legend]

Member Data Documentation

◆ mFadeColor

RGBColorFloat mFadeColor = { 0.0f, 0.0f, 0.0f }

Property: 'FadeColor' Fade color.

◆ mFadeDuration

float mFadeDuration = 2.0f

Property: 'FadeDuration' Duration of the fade transition in seconds.

◆ mFadeIn

bool mFadeIn = true

Property: 'FadeIn' Whether to fade in from 'FadeColor' on startup.