#include <renderfadercomponent.h>
Public Types | |
enum | EFadeState : nap::uint8 { FadingIn = 0, FadedIn = 1, FadingOut = 2, FadedOut = 3 } |
Public Member Functions | |
RenderFaderComponentInstance (EntityInstance &entity, Component &component) | |
virtual bool | init (utility::ErrorState &errorState) override |
virtual void | update (double deltaTime) override |
EFadeState | getState () const |
void | fadeIn () |
void | fadeOut () |
![]() | |
RenderableComponentInstance (EntityInstance &entity, Component &resource) | |
void | draw (IRenderTarget &renderTarget, VkCommandBuffer commandBuffer, const glm::mat4 &viewMatrix, const glm::mat4 &projectionMatrix) |
void | setVisible (bool visible) |
bool | isVisible () const |
const std::vector< ResourcePtr< RenderTag > > & | getTags () const |
RenderMask | getMask () const |
bool | includesMask (RenderMask otherMask) |
int | getRank () const |
const RenderLayer * | getLayer () const |
virtual bool | isSupported (nap::CameraComponentInstance &camera) const |
![]() | |
ComponentInstance (EntityInstance &entity, Component &resource) | |
nap::EntityInstance * | getEntityInstance () const |
nap::Component * | getComponent () const |
template<typename T > | |
T * | getComponent () const |
virtual bool | init (utility::ErrorState &errorState) |
![]() | |
Object () | |
virtual | ~Object () |
virtual void | onDestroy () |
Object (Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&)=delete | |
Object & | operator= (Object &&)=delete |
Public Attributes | |
nap::Signal | mFadedIn |
Triggered when a fade transition finished fading from 'FadeColor'. More... | |
nap::Signal | mFadedOut |
Triggered when a fade transition finished fading to 'FadeColor'. More... | |
![]() | |
std::string | mID |
Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Protected Member Functions | |
virtual void | onDraw (IRenderTarget &renderTarget, VkCommandBuffer commandBuffer, const glm::mat4 &viewMatrix, const glm::mat4 &projectionMatrix) override |
Additional Inherited Members | |
![]() | |
static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
![]() | |
RenderService * | mRenderService = nullptr |
Instance 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
.
|
strong |
RenderFaderComponentInstance | ( | EntityInstance & | entity, |
Component & | component | ||
) |
void fadeIn | ( | ) |
Starts a fade-in transition.
void fadeOut | ( | ) |
Starts a fade-out transition.
EFadeState getState | ( | ) | const |
|
overridevirtual |
Initializes this component.
Reimplemented from RenderableComponentInstance.
|
overrideprotectedvirtual |
Renders the triangle mesh using the fade material.
Implements RenderableComponentInstance.
|
overridevirtual |
Updates the local transform of this component such that it represents the location of the back plane. This ensures the depth sorter considers this object to be behind other components inside the box.
deltaTime | the time in between cooks in seconds |
Reimplemented from ComponentInstance.
nap::Signal mFadedIn |
Triggered when a fade transition finished fading from 'FadeColor'.
nap::Signal mFadedOut |
Triggered when a fade transition finished fading to 'FadeColor'.