History: OgreFontHelper
Source of version: 3 (current)
Copy to clipboard
((User:Ghoulsblade|Ghoulsblade)) 01:13, 2 July 2007 (BST) : a while ago i wrote some utils for rendering text as the textarea overlay was not sufficient for my needs.
maybe someone will find this useful :)
what this might be useful for :
* render text inside the 3d scene (flat, but with 3d coordinates)
* calculating text bounds before/without creating an overlay element
* autowrapping of text
* mousepicking of text (what glyph/charindex is below the mouse, useful for text input)
* getting the bounding box of a glyph/charindex inside a textbox, e.g. for highlighting text/selection
here's a forum thread about it :
* [http://www.ogre3d.org/phpBB2/viewtopic.php?t=29344&highlight=]
here is the code :
* [http://zwischenwelt.org/trac/lugre/browser/trunk/lugre/include/lugre_ogrefonthelper.h]
usage examples :
* [http://zwischenwelt.org/trac/lugre/browser/trunk/lugre/src/lugre_ColourClipTextOverlay.cpp]
* [http://zwischenwelt.org/trac/lugre/browser/trunk/lugre/include/lugre_ColourClipTextOverlay.h]