You.i Engine
CYIRenderable Class Reference

Detailed Description

This class contains the data required by the renderer in order to render a renderable component.

#include <renderer/YiRenderable.h>

Public Member Functions

 CYIRenderable ()
const std::shared_ptr< IYIUniformBufferObject > & GetShaderUniforms () const
const std::shared_ptr< CYIMesh > & GetMesh () const
void SetMesh (const std::shared_ptr< CYIMesh > &pMesh)
size_t GetMaterialCount () const
const std::shared_ptr< CYIMaterial > & GetMaterial (size_t index=0) const
void SetMaterial (const std::shared_ptr< CYIMaterial > &pMaterial, size_t index=0)
const std::shared_ptr< CYIRenderTarget > & GetRenderTarget () const
void SetRenderTarget (const std::shared_ptr< CYIRenderTarget > &pRenderTarget)
void AddMask (std::unique_ptr< CYIMask > pMask)
std::unique_ptr< CYIMaskRemoveMask (const CYIMask *pMask)
void ClearMasks ()
size_t GetMaskCount () const
const CYIMaskGetMask (size_t index) const
CYIMaskGetMask (size_t index)
void SetClippingBox (const CYIAABB &rWorldBox)
const CYIAABBGetClippingBox () const
void SetModelMatrix (const glm::mat4 &transform)
const glm::mat4 & GetModelMatrix () const

Constructor & Destructor Documentation

◆ CYIRenderable()

CYIRenderable::CYIRenderable ( )

Member Function Documentation

◆ AddMask()

void CYIRenderable::AddMask ( std::unique_ptr< CYIMask pMask)

Adds a mask to this renderable. If pMask is null it will be ignored. Masks are processed during the construction of the draw list.

◆ ClearMasks()

void CYIRenderable::ClearMasks ( )

◆ GetClippingBox()

const CYIAABB& CYIRenderable::GetClippingBox ( ) const

Returns the clipping volume for this renderable. The volume is specified in 3-dimensional world space but the clipping will be done in screen-space.

◆ GetMask() [1/2]

const CYIMask* CYIRenderable::GetMask ( size_t  index) const

Returns the mask at index.

◆ GetMask() [2/2]

CYIMask* CYIRenderable::GetMask ( size_t  index)

Returns a mutable mask.

◆ GetMaskCount()

size_t CYIRenderable::GetMaskCount ( ) const

Returns the number of masks on this renderable.

◆ GetMaterial()

const std::shared_ptr<CYIMaterial>& CYIRenderable::GetMaterial ( size_t  index = 0) const

Returns the material of this renderable at index.

◆ GetMaterialCount()

size_t CYIRenderable::GetMaterialCount ( ) const

Returns the number of materials on this renderable.

◆ GetMesh()

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

Returns the mesh assigned to this renderable.

◆ GetModelMatrix()

const glm::mat4& CYIRenderable::GetModelMatrix ( ) const

Returns the model matrix assigned to this renderable.

◆ GetRenderTarget()

const std::shared_ptr<CYIRenderTarget>& CYIRenderable::GetRenderTarget ( ) const

Returns the render target for this renderable.

◆ GetShaderUniforms()

const std::shared_ptr<IYIUniformBufferObject>& CYIRenderable::GetShaderUniforms ( ) const

Returns the shader uniforms that will be used for rendering this renderable.

◆ RemoveMask()

std::unique_ptr<CYIMask> CYIRenderable::RemoveMask ( const CYIMask pMask)

Remove a mask from this renderable.

◆ SetClippingBox()

void CYIRenderable::SetClippingBox ( const CYIAABB rWorldBox)

Sets the clipping volume for this renderable. The volume is specified in 3-dimensional world space but the clipping will be done in screen-space.

◆ SetMaterial()

void CYIRenderable::SetMaterial ( const std::shared_ptr< CYIMaterial > &  pMaterial,
size_t  index = 0 

Assigns a material to this renderable.

◆ SetMesh()

void CYIRenderable::SetMesh ( const std::shared_ptr< CYIMesh > &  pMesh)

Assigns a mesh to this renderable.

◆ SetModelMatrix()

void CYIRenderable::SetModelMatrix ( const glm::mat4 &  transform)

Assigns a model matrix to this renderable.

◆ SetRenderTarget()

void CYIRenderable::SetRenderTarget ( const std::shared_ptr< CYIRenderTarget > &  pRenderTarget)

Sets the render target for this renderable. This is the destination to which the renderable and all of its descendants will be rendered.

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