You.i Engine
CYIEffect Class Reference

#include <renderer/YiEffect.h>

Inheritance diagram for CYIEffect:

Classes

struct  EFFECT_CONFIG
 

Public Member Functions

 CYIEffect ()
 
virtual ~CYIEffect ()
 
bool SetEffect (CYISceneNode *pOwner, EFFECT_CONFIG config)
 
void ResetEffectSize (int32_t nWidth, int32_t nHeight)
 
void SetEffectOwner (CYISceneNode *pOwner)
 
const std::shared_ptr< CYIRenderTargetGetRenderTarget (uint32_t nIndex) const
 
void SetRenderTarget (std::shared_ptr< CYIOffscreenRenderTarget > pTarget, uint32_t nIndex)
 
const std::shared_ptr< CYIMesh > & GetMesh () const
 
const glm::mat4 & GetTransform () const
 
void SetTransform (glm::mat4 &Transform)
 
CYIAbstractCameraSceneNodeGetCamera () const
 
const std::shared_ptr< CYIMaterialGetMaterial (uint32_t nIndex) const
 
const EFFECT_CONFIGGetConfig () const
 
void SetNeedsUpdate (bool bUpdate) const
 
bool GetNeedsUpdate () const
 
void SetCustomUniforms ()
 
void ConnectTimelineTrack (const CYITimelineTrack *pTrack)
 
void SetUniformValue (uint32_t nTrackID, const CYIVariant &value)
 
void SetUniformValueDirect (uint32_t uIndex, const CYIVariant &value)
 
void Enable (bool bEnable)
 

Protected Attributes

CYISceneNodem_pOwner
 
EFFECT_CONFIG m_config
 
std::shared_ptr< CYIMeshm_pMesh
 
std::vector< std::shared_ptr< CYIMaterial > > m_pMaterials
 
std::vector< std::shared_ptr< CYIOffscreenRenderTarget > > m_pTargets
 
std::vector< EffectUniformVariableUniformVariables
 
glm::mat4 m_Transform
 
bool m_bNeedsUpdate
 
bool m_bEnable
 
std::shared_ptr< CYIMaterialm_pOrigMaterial
 
std::shared_ptr< CYIRenderTargetm_pOrigTarget
 
std::shared_ptr< CYIMeshm_pOrigMesh
 

Constructor & Destructor Documentation

CYIEffect::CYIEffect ( )
virtual CYIEffect::~CYIEffect ( )
virtual

Member Function Documentation

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.

void CYIEffect::Enable ( bool  bEnable)

Set the effect on or off.

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.

Warning
this camera is owned by the effect and should not be cached or deleted.
const EFFECT_CONFIG& CYIEffect::GetConfig ( ) const

Get the effect's configuration information.

const std::shared_ptr<CYIMaterial> CYIEffect::GetMaterial ( uint32_t  nIndex) const

Get the material for the effect on a particular pass.

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

Get the mesh data represented by this effect.

bool CYIEffect::GetNeedsUpdate ( ) const

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

const std::shared_ptr<CYIRenderTarget> CYIEffect::GetRenderTarget ( uint32_t  nIndex) const

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

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

Get the transform for the effect.

void CYIEffect::ResetEffectSize ( int32_t  nWidth,
int32_t  nHeight 
)

reset effect with a given configuration.

void CYIEffect::SetCustomUniforms ( )

Set the effect shader uniforms.

bool CYIEffect::SetEffect ( CYISceneNode pOwner,
EFFECT_CONFIG  config 
)

Initialize effect with a given configuration.

void CYIEffect::SetEffectOwner ( CYISceneNode pOwner)

Set the effect to a new owner.

void CYIEffect::SetNeedsUpdate ( bool  bUpdate) 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.

void CYIEffect::SetRenderTarget ( std::shared_ptr< CYIOffscreenRenderTarget pTarget,
uint32_t  nIndex 
)

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

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

Set a transform for the effect.

void CYIEffect::SetUniformValue ( uint32_t  nTrackID,
const CYIVariant value 
)

Set the effect shader uniforms.

void CYIEffect::SetUniformValueDirect ( uint32_t  uIndex,
const CYIVariant value 
)

Set the effect shader uniforms.

Member Data Documentation

bool CYIEffect::m_bEnable
protected

The effect's enable flag

bool CYIEffect::m_bNeedsUpdate
mutableprotected

The effect's update flag

EFFECT_CONFIG CYIEffect::m_config
protected

The effect's configuration

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

The effect's materials

std::shared_ptr<CYIMesh> CYIEffect::m_pMesh
protected

The effect's mesh

std::shared_ptr<CYIMaterial> CYIEffect::m_pOrigMaterial
protected

The effect owner's material

std::shared_ptr<CYIMesh> CYIEffect::m_pOrigMesh
protected

The effect owner's mesh

std::shared_ptr<CYIRenderTarget> CYIEffect::m_pOrigTarget
protected

The effect owner's target

CYISceneNode* CYIEffect::m_pOwner
protected

The effect's owner

std::vector<std::shared_ptr<CYIOffscreenRenderTarget> > CYIEffect::m_pTargets
protected

The effect's targets

glm::mat4 CYIEffect::m_Transform
protected

The effect's transformation

std::vector<EffectUniformVariable> CYIEffect::UniformVariables
protected

The effect's uniform variables, if any


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