Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
Public Member Functions | Protected Member Functions | Protected Attributes
render::Font Class Reference

#include <Font.h>

Inheritance diagram for render::Font:
resource::Resource engine::Object

List of all members.

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
MaterialgetMaterial () 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)
MaterialmMaterial
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.

Detailed Description

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.


Constructor & Destructor Documentation

render::Font::Font ( const std::string &  name,
resource::Serializer serializer 
)
render::Font::~Font ( )

Member Function Documentation

f32 render::Font::getCharAspectRatio ( c8  id) const
void render::Font::getCharTexCoords ( c8  id,
f32 u1,
f32 v1,
f32 u2,
f32 v2 
) const
Material * render::Font::getMaterial ( ) const

References mMaterial.

Referenced by render::TextOverlay::getMaterial().

void render::Font::initProperties ( ) [protected]

Reimplemented from resource::Resource.

References mMaterial.

Referenced by Font().

void render::Font::setCharTexCoords ( c8  id,
f32  u1,
f32  v1,
f32  u2,
f32  v2 
)
void render::Font::setMaterial ( const std::string &  filename)
void render::Font::setMaterial ( Material material)

References mMaterial.


Member Data Documentation

f32 render::Font::mAspectRatio[GAME_NUM_CHARS] [protected]

Aspect ratio between x and y (width / height)

Referenced by getCharAspectRatio(), and setCharTexCoords().

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 documentation for this class was generated from the following files:

The KG Game Engine
The KG Game Engine Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:08 by Doxygen (1.7.4)