Image Component Library (ICL)
|
Text Texture. More...
#include <Primitive.h>
Public Member Functions | |
TextPrimitive (int a, int b, int c, int d, const std::string &text, int textSize=20, const GeomColor &textColor=GeomColor(255, 255, 255, 255), int na=-1, int nb=-1, int nc=-1, int nd=-1, float billboardHeight=0, core::scalemode sm=core::interpolateLIN) | |
constructor | |
~TextPrimitive () | |
virtual void | render (const Primitive::RenderContext &ctx) |
render method | |
virtual Primitive * | copy () const |
deep copy method | |
void | updateText (const std::string &newText) |
sets new text | |
Static Public Member Functions | |
static core::Img8u | create_texture (const std::string &text, const GeomColor &color, int textSize) |
utility method to creat a text texture | |
Public Attributes | |
int | textSize |
internal memory for the text size | |
GeomColor | textColor |
internal memory for the text color | |
float | billboardHeight |
used for billboard text |
Text Texture.
The text texture is implemented by a static common texture
icl::geom::TextPrimitive::TextPrimitive | ( | int | a, |
int | b, | ||
int | c, | ||
int | d, | ||
const std::string & | text, | ||
int | textSize = 20 , |
||
const GeomColor & | textColor = GeomColor(255, 255, 255, 255) , |
||
int | na = -1 , |
||
int | nb = -1 , |
||
int | nc = -1 , |
||
int | nd = -1 , |
||
float | billboardHeight = 0 , |
||
core::scalemode | sm = core::interpolateLIN |
||
) |
constructor
virtual Primitive* icl::geom::TextPrimitive::copy | ( | ) | const [inline, virtual] |
deep copy method
Reimplemented from icl::geom::TexturePrimitive.
static core::Img8u icl::geom::TextPrimitive::create_texture | ( | const std::string & | text, |
const GeomColor & | color, | ||
int | textSize | ||
) | [static] |
utility method to creat a text texture
virtual void icl::geom::TextPrimitive::render | ( | const Primitive::RenderContext & | ctx | ) | [virtual] |
render method
Reimplemented from icl::geom::TexturePrimitive.
void icl::geom::TextPrimitive::updateText | ( | const std::string & | newText | ) | [inline] |
sets new text
used for billboard text
if the value is > 0, the text-texture will always be oriented towards the camera. the billboardHeight value is used as text-height (in scene units)
internal memory for the text color
internal memory for the text size