You.i Engine
CYIEffect Class Reference

#include <renderer/YiEffect.h>

Inheritance diagram for CYIEffect:



Public Member Functions

 CYIEffect ()
virtual ~CYIEffect ()
bool SetEffect (CYISceneNode *pOwner, EFFECT_CONFIG config)
void ResetEffectSize (int32_t width, int32_t height)
void SetEffectOwner (CYISceneNode *pOwner)
const std::shared_ptr< CYIRenderTarget > & GetRenderTarget (size_t index) const
void SetRenderTarget (const std::shared_ptr< CYIOffscreenRenderTarget > &pTarget, size_t index)
const std::shared_ptr< CYIMesh > & GetMesh () const
const glm::mat4 & GetTransform () const
void SetTransform (glm::mat4 &Transform)
CYIAbstractCameraSceneNodeGetCamera () const
const std::shared_ptr< CYIMaterial > & GetMaterial (size_t index) const
const EFFECT_CONFIGGetConfig () const
void SetNeedsUpdate (bool update) const
bool GetNeedsUpdate () const
void SetCustomUniforms ()
void ConnectTimelineTrack (const CYITimelineTrack *pTrack)
void SetUniformValue (uint32_t trackID, const CYIVariant &value)
void SetUniformValueDirect (size_t index, const CYIVariant &value)
void Enable (bool enable)

Protected Attributes

std::shared_ptr< CYIMeshm_pMesh
std::vector< std::shared_ptr< CYIMaterial > > m_pMaterials
std::vector< std::shared_ptr< CYIRenderTarget > > m_pTargets
std::vector< EffectUniformVariableUniformVariables
glm::mat4 m_Transform
bool m_needsUpdate
bool m_enable
std::shared_ptr< CYIMaterialm_pOrigMaterial
std::shared_ptr< CYIRenderTargetm_pOrigTarget
std::shared_ptr< CYIMeshm_pOrigMesh

Constructor & Destructor Documentation

◆ CYIEffect()

CYIEffect::CYIEffect ( )

◆ ~CYIEffect()

virtual CYIEffect::~CYIEffect ( )

Member Function Documentation

◆ ConnectTimelineTrack()

void CYIEffect::ConnectTimelineTrack ( const CYITimelineTrack pTrack)

Connect this effect to a timeline track. This is normally called by the object that owns the effect to attach it automatically to AE timelines as they are loaded.

◆ Enable()

void CYIEffect::Enable ( bool  enable)

Set the effect on or off.

◆ GetCamera()

CYIAbstractCameraSceneNode* CYIEffect::GetCamera ( ) const

Get the effect's camera. This camera describes a view which is the content of the scene viewed such that the scene encompasses a region matching the size of the effect's region of interest.

this camera is owned by the effect and should not be cached or deleted.

◆ GetConfig()

const EFFECT_CONFIG& CYIEffect::GetConfig ( ) const

Get the effect's configuration information.

◆ GetMaterial()

const std::shared_ptr<CYIMaterial>& CYIEffect::GetMaterial ( size_t  index) const

Get the material for the effect on a particular pass.

◆ GetMesh()

const std::shared_ptr<CYIMesh>& CYIEffect::GetMesh ( ) const

Get the mesh data represented by this effect.

◆ GetNeedsUpdate()

bool CYIEffect::GetNeedsUpdate ( ) const

Get the effect's current status for requiring a rendering update.

◆ GetRenderTarget()

const std::shared_ptr<CYIRenderTarget>& CYIEffect::GetRenderTarget ( size_t  index) const

Get the render target for the effect on a particular pass.

◆ GetTransform()

const glm::mat4& CYIEffect::GetTransform ( ) const

Get the transform for the effect.

◆ ResetEffectSize()

void CYIEffect::ResetEffectSize ( int32_t  width,
int32_t  height 

reset effect with a given configuration.

◆ SetCustomUniforms()

void CYIEffect::SetCustomUniforms ( )

Set the effect shader uniforms.

◆ SetEffect()

bool CYIEffect::SetEffect ( CYISceneNode pOwner,

Initialize effect with a given configuration.

◆ SetEffectOwner()

void CYIEffect::SetEffectOwner ( CYISceneNode pOwner)

Set the effect to a new owner.

◆ SetNeedsUpdate()

void CYIEffect::SetNeedsUpdate ( bool  update) const

Set the effect's current status for requiring a rendering update. this is called by the node if children are being updated which requires us to redraw the effects even though the effect itself may not have changed.

◆ SetRenderTarget()

void CYIEffect::SetRenderTarget ( const std::shared_ptr< CYIOffscreenRenderTarget > &  pTarget,
size_t  index 

Set the render target for the effect on a particular pass.

◆ SetTransform()

void CYIEffect::SetTransform ( glm::mat4 &  Transform)

Set a transform for the effect.

◆ SetUniformValue()

void CYIEffect::SetUniformValue ( uint32_t  trackID,
const CYIVariant value 

Set the effect shader uniforms.

◆ SetUniformValueDirect()

void CYIEffect::SetUniformValueDirect ( size_t  index,
const CYIVariant value 

Set the effect shader uniforms.

Member Data Documentation

◆ m_config

EFFECT_CONFIG CYIEffect::m_config

The effect's configuration

◆ m_enable

bool CYIEffect::m_enable

The effect's enable flag

◆ m_needsUpdate

bool CYIEffect::m_needsUpdate

The effect's update flag

◆ m_pMaterials

std::vector<std::shared_ptr<CYIMaterial> > CYIEffect::m_pMaterials

The effect's materials

◆ m_pMesh

std::shared_ptr<CYIMesh> CYIEffect::m_pMesh

The effect's mesh

◆ m_pOrigMaterial

std::shared_ptr<CYIMaterial> CYIEffect::m_pOrigMaterial

The effect owner's material

◆ m_pOrigMesh

std::shared_ptr<CYIMesh> CYIEffect::m_pOrigMesh

The effect owner's mesh

◆ m_pOrigTarget

std::shared_ptr<CYIRenderTarget> CYIEffect::m_pOrigTarget

The effect owner's target

◆ m_pOwner

CYISceneNode* CYIEffect::m_pOwner

The effect's owner

◆ m_pTargets

std::vector<std::shared_ptr<CYIRenderTarget> > CYIEffect::m_pTargets

The effect's targets

◆ m_Transform

glm::mat4 CYIEffect::m_Transform

The effect's transformation

◆ UniformVariables

std::vector<EffectUniformVariable> CYIEffect::UniformVariables

The effect's uniform variables, if any

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