Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
#include <Font.h>
Public Member Functions | |
Font (const std::string &name, resource::Serializer *serializer) | |
f32 | getCharAspectRatio (c8 id) const |
void | getCharTexCoords (c8 id, f32 &u1, f32 &v1, f32 &u2, f32 &v2) const |
Material * | getMaterial () const |
void | setCharTexCoords (c8 id, f32 u1, f32 v1, f32 u2, f32 v2) |
void | setMaterial (const std::string &filename) |
Sets the material for the font. | |
void | setMaterial (Material *material) |
~Font () | |
Protected Member Functions | |
void | initProperties () |
Protected Attributes | |
f32 | mAspectRatio [GAME_NUM_CHARS] |
Aspect ratio between x and y (width / height) | |
Material * | mMaterial |
f32 | mTexCoordsU1 [GAME_NUM_CHARS] |
Start u coords. | |
f32 | mTexCoordsU2 [GAME_NUM_CHARS] |
End u coords. | |
f32 | mTexCoordsV1 [GAME_NUM_CHARS] |
Start v coords. | |
f32 | mTexCoordsV2 [GAME_NUM_CHARS] |
End v coords. |
Class representing a font in the system.
This class is simply a way of getting a font texture into the render system and to easily retrieve the texture coordinates required to accurately render them.
render::Font::Font | ( | const std::string & | name, |
resource::Serializer * | serializer | ||
) |
References initProperties(), resource::Resource::mResourceType, and resource::RT_RESOURCE_FONT.
render::Font::~Font | ( | ) |
References GAME_CHAR_INDEX, and mAspectRatio.
Referenced by render::TextOverlay::updatePositionBinding().
References GAME_CHAR_INDEX, mTexCoordsU1, mTexCoordsU2, mTexCoordsV1, and mTexCoordsV2.
Referenced by render::TextOverlay::updatePositionBinding().
Material * render::Font::getMaterial | ( | ) | const |
References mMaterial.
Referenced by render::TextOverlay::getMaterial().
void render::Font::initProperties | ( | ) | [protected] |
References GAME_CHAR_INDEX, mAspectRatio, mTexCoordsU1, mTexCoordsU2, mTexCoordsV1, and mTexCoordsV2.
void render::Font::setMaterial | ( | const std::string & | filename | ) |
Sets the material for the font.
References resource::ResourceManager::getInstance(), mMaterial, and resource::RT_RESOURCE_RENDER_MATERIAL.
f32 render::Font::mAspectRatio[GAME_NUM_CHARS] [protected] |
Aspect ratio between x and y (width / height)
Referenced by getCharAspectRatio(), and setCharTexCoords().
Material* render::Font::mMaterial [protected] |
Referenced by getMaterial(), initProperties(), and setMaterial().
f32 render::Font::mTexCoordsU1[GAME_NUM_CHARS] [protected] |
Start u coords.
Referenced by getCharTexCoords(), and setCharTexCoords().
f32 render::Font::mTexCoordsU2[GAME_NUM_CHARS] [protected] |
End u coords.
Referenced by getCharTexCoords(), and setCharTexCoords().
f32 render::Font::mTexCoordsV1[GAME_NUM_CHARS] [protected] |
Start v coords.
Referenced by getCharTexCoords(), and setCharTexCoords().
f32 render::Font::mTexCoordsV2[GAME_NUM_CHARS] [protected] |
End v coords.
Referenced by getCharTexCoords(), and setCharTexCoords().
The KG Game Engine
Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:08 by
Doxygen
(1.7.4)
|