Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
Represents a text overlay which is rendered on top of the 'normal' scene contents. More...
#include <TextOverlay.h>
Public Member Functions | |
Alignment | getAlignment () const |
const std::string & | getCaption () const |
f32 | getCharHeight () const |
Material * | getMaterial () const |
Gets the material which this mesh uses. | |
f32 | getSpaceWidth () const |
void | setAlignment (Alignment a) |
void | setCaption (const std::string &caption) |
void | setCharHeight (f32 height) |
void | setFont (Font *font) |
void | setFont (const std::string &name) |
Sets the the Font which this overlay will use. | |
void | setSpaceWidth (f32 width) |
TextOverlay (const std::string &name) | |
TextOverlay () | |
~TextOverlay () | |
Protected Member Functions | |
void | allocateMemory (u32 numChars) |
void | initializeImpl () |
void | initProperties () |
void | updatePositionBinding () |
Internal method for updating the positions of the element. | |
void | updateTextureBinding () |
Internal method for updating the UVs of the element. | |
void | updateTransformImpl () |
Protected Attributes | |
Alignment | mAlignment |
The text alignment. | |
u32 | mAllocSize |
std::string | mCaption |
f32 | mCharHeight |
Font * | mFont |
f32 | mPixelCharHeight |
f32 | mPixelSpaceWidth |
f32 | mSpaceWidth |
f32 | mViewportAspectCoef |
Represents a text overlay which is rendered on top of the 'normal' scene contents.
render::TextOverlay::TextOverlay | ( | ) |
References engine::Object::initialize(), and initProperties().
render::TextOverlay::TextOverlay | ( | const std::string & | name | ) |
References engine::Object::initialize(), and initProperties().
render::TextOverlay::~TextOverlay | ( | ) |
void render::TextOverlay::allocateMemory | ( | u32 | numChars | ) | [protected] |
References resource::BL_DISCARD, resource::BU_DYNAMIC, render::RenderManager::createIndexBuffer(), render::RenderManager::createVertexBuffer(), render::RenderManager::getInstance(), render::VertexDeclaration::getVertexSize(), render::IndexData::indexBuffer, render::IndexData::indexCount, render::IT_32BIT, resource::Buffer::lock(), mAllocSize, render::Overlay::mIndexData, render::Overlay::mVertexData, POS_TEX_BINDING, render::VertexBufferBinding::setBinding(), resource::Buffer::unlock(), render::VertexData::vertexBufferBinding, render::VertexData::vertexCount, and render::VertexData::vertexDeclaration.
Referenced by initializeImpl(), and updatePositionBinding().
Alignment render::TextOverlay::getAlignment | ( | ) | const |
References mAlignment.
const std::string & render::TextOverlay::getCaption | ( | ) | const |
References mCaption.
f32 render::TextOverlay::getCharHeight | ( | ) | const |
References mCharHeight.
Material * render::TextOverlay::getMaterial | ( | ) | const [virtual] |
Gets the material which this mesh uses.
Reimplemented from render::Overlay.
References render::Font::getMaterial(), and mFont.
f32 render::TextOverlay::getSpaceWidth | ( | ) | const |
References mSpaceWidth.
void render::TextOverlay::initializeImpl | ( | ) | [protected, virtual] |
Reimplemented from engine::Object.
References render::VertexDeclaration::addElement(), allocateMemory(), DEFAULT_INITIAL_CHARS, render::VertexElement::getTypeSize(), render::IndexData::indexStart, render::Overlay::mGeometryInitialized, render::Overlay::mIndexData, render::Overlay::mVertexData, POS_TEX_BINDING, render::VertexData::vertexDeclaration, render::VertexData::vertexStart, render::VES_POSITION, render::VES_TEXTURE_COORDINATES, render::VET_FLOAT2, and render::VET_FLOAT3.
void render::TextOverlay::initProperties | ( | ) | [protected] |
Reimplemented from render::Overlay.
References render::A_LEFT, mAlignment, mAllocSize, mCharHeight, mFont, mPixelCharHeight, mPixelSpaceWidth, mSpaceWidth, and mViewportAspectCoef.
Referenced by TextOverlay().
void render::TextOverlay::setAlignment | ( | Alignment | a | ) |
References mAlignment, and render::Overlay::mGeomPositionsOutOfDate.
void render::TextOverlay::setCaption | ( | const std::string & | caption | ) |
void render::TextOverlay::setCharHeight | ( | f32 | height | ) |
void render::TextOverlay::setFont | ( | Font * | font | ) |
References mFont, render::Overlay::mGeomPositionsOutOfDate, and render::Overlay::mGeomUVsOutOfDate.
void render::TextOverlay::setFont | ( | const std::string & | name | ) |
Sets the the Font which this overlay will use.
References resource::ResourceManager::getInstance(), mFont, render::Overlay::mGeomPositionsOutOfDate, render::Overlay::mGeomUVsOutOfDate, and resource::RT_RESOURCE_FONT.
void render::TextOverlay::setSpaceWidth | ( | f32 | width | ) |
void render::TextOverlay::updatePositionBinding | ( | ) | [protected, virtual] |
Internal method for updating the positions of the element.
Implements render::Overlay.
References render::A_CENTER, render::A_RIGHT, allocateMemory(), resource::BL_DISCARD, render::VertexBufferBinding::getBuffer(), render::Font::getCharAspectRatio(), render::Font::getCharTexCoords(), render::RenderManager::getInstance(), render::RenderManager::getMaximumDepthInputValue(), resource::Resource::getState(), render::RenderManager::getViewportWidth(), render::Overlay::getWidth(), render::IndexData::indexCount, resource::Buffer::lock(), mAlignment, mCaption, mCharHeight, mFont, render::Overlay::mGeometryInitialized, render::Overlay::mHeight, render::Overlay::mIndexData, render::MM_PIXELS, render::Overlay::mMetricsMode, mSpaceWidth, render::Overlay::mVertexData, mViewportAspectCoef, render::Overlay::mWidth, POS_TEX_BINDING, resource::RS_LOADED, render::Overlay::setDimension(), UNICODE_CR, UNICODE_LF, UNICODE_NEL, UNICODE_SPACE, UNICODE_ZERO, resource::Buffer::unlock(), render::VertexData::vertexBufferBinding, and render::VertexData::vertexCount.
void render::TextOverlay::updateTextureBinding | ( | ) | [protected, virtual] |
Internal method for updating the UVs of the element.
Implements render::Overlay.
void render::TextOverlay::updateTransformImpl | ( | ) | [protected, virtual] |
Reimplemented from scene::Node.
References render::RenderManager::getInstance(), render::RenderManager::getViewportHeight(), render::RenderManager::getViewportWidth(), mCharHeight, render::Overlay::mGeomPositionsOutOfDate, render::MM_PIXELS, render::MM_RELATIVE_ASPECT_ADJUSTED, render::Overlay::mMetricsMode, mPixelCharHeight, mPixelSpaceWidth, mSpaceWidth, and mViewportAspectCoef.
Alignment render::TextOverlay::mAlignment [protected] |
The text alignment.
Referenced by getAlignment(), initProperties(), setAlignment(), and updatePositionBinding().
u32 render::TextOverlay::mAllocSize [protected] |
Referenced by allocateMemory(), and initProperties().
std::string render::TextOverlay::mCaption [protected] |
Referenced by getCaption(), setCaption(), and updatePositionBinding().
f32 render::TextOverlay::mCharHeight [protected] |
Referenced by getCharHeight(), initProperties(), setCharHeight(), updatePositionBinding(), and updateTransformImpl().
Font* render::TextOverlay::mFont [protected] |
Referenced by getMaterial(), initProperties(), setFont(), and updatePositionBinding().
f32 render::TextOverlay::mPixelCharHeight [protected] |
Referenced by initProperties(), setCharHeight(), and updateTransformImpl().
f32 render::TextOverlay::mPixelSpaceWidth [protected] |
Referenced by initProperties(), setSpaceWidth(), and updateTransformImpl().
f32 render::TextOverlay::mSpaceWidth [protected] |
Referenced by getSpaceWidth(), initProperties(), setSpaceWidth(), updatePositionBinding(), and updateTransformImpl().
f32 render::TextOverlay::mViewportAspectCoef [protected] |
Referenced by initProperties(), updatePositionBinding(), and updateTransformImpl().
The KG Game Engine
Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:09 by
Doxygen
(1.7.4)
|