Text
The Text plugin provides 2D and 3D text generation from TTF fonts by converting font outlines into Brep geometry suitable for real-time rendering. It supports parent-child hierarchies, allowing multiple Text instances to share a single loaded font. Text geometry can be generated as either Brep or ObjectBrep objects. The plugin also supports Xml based serialization for saving and restoring text configurations.
info
This plugin is integrated into Tellusim Explorer.
#include <objects/text/include/TellusimText.h>
Example
// Create text
Text text;
text.setSize(12.0f);
text.setSpace(4.0f);
text.setSpacingX(0.5f);
text.setExtrudeZ(0.3f);
// Load font
if(!text.loadFont(DATA_PATH "sansb.ttf")) return false;
// Create Brep geometry
text.setText(String::tformat("Tellusim SDK\nplugins/objects/text\n{0}", date.getString("HH:mm:ss")));
if(!text.create(object, &text_material)) return false;
object.updateScene();