Bubba-3D  0.9.0
Awesome game engine!
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
HudRenderer Class Reference

#include <HudRenderer.h>

Inheritance diagram for HudRenderer:
IRenderComponent IComponent

Public Member Functions

virtual void render ()
 
virtual void renderShadow (ShaderProgram *shaderProgram)
 
virtual void update (float dt)
 
virtual void updateLayout ()
 
virtual void setLayout (Layout *layout)
 
virtual LayoutgetLayoutById (std::string id)
 
virtual IHudDrawablegetHudDrawableById (std::string id)
 
void setWorldCamera (Camera *worldCamera)
 
void addRelativeLayout (GameObject *relativeTo, Layout *layout)
 
- Public Member Functions inherited from IComponent
void bind (GameObject *owner)
 
virtual void beforeCollision (GameObject *collider)
 
virtual void duringCollision (GameObject *collider)
 
virtual void afterCollision (GameObject *collider)
 
virtual void onDeath ()
 

Protected Member Functions

chag::float4x4 createOrthographicProjection ()
 

Protected Attributes

std::map< std::string, IHudDrawable * > squares
 
LayoutrootLayout
 
CameraworldCamera
 
std::vector< std::pair< GameObject *, Layout * > > relativeLayouts
 
- Protected Attributes inherited from IRenderComponent
ShaderProgramshaderProgram
 
- Protected Attributes inherited from IComponent
GameObjectowner
 

Detailed Description

The main class used to render a HUD or other types of UI

Definition at line 33 of file HudRenderer.h.

Member Function Documentation

IHudDrawable * HudRenderer::getHudDrawableById ( std::string  id)
virtual

Get the low-level drawable produced by any of the layout components.

You can retrieve the GLSquare produced as a background by specifying the layout id of the Layout that produced the background. This can be useful if you want to modify the rotation and/or position of an element without calling HudRenderer::updateLayout()

You can retrieve the TextObject produced by a TextLayout by specifying the text id. This can be used to modify the text of the element without calling HudRenderer::updateLayout()

See also
Layout::setLayoutId()
TextLayout::setTextId()

Definition at line 72 of file HudRenderer.cpp.

Layout * HudRenderer::getLayoutById ( std::string  id)
virtual

Get any layout in the root layout added in HudRenderer::setLayout() by its layout ID.

Definition at line 47 of file HudRenderer.cpp.

void HudRenderer::setLayout ( Layout layout)
virtual

Set the layout of the HUD

Definition at line 42 of file HudRenderer.cpp.

void HudRenderer::updateLayout ( )
virtual

Whenever you change something about the active Layout or its children you must call this method to update the rendering. This is a bit expensive and should be avoided when possible.

See also
HudRenderer::getHudDrawableById()

Definition at line 51 of file HudRenderer.cpp.


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