Dynamic Text for Xith (DTX)
As there is no ( or no dynamic ) text node for xith3d here is mine.
While the Text2D version org.xith3d.text.Text2D by Terje Wiesener uses a single face with a static texture
this class uses a seperate Shape3d for every char it uses. Those shapes are stored in a static HashMap to prevent
some load when using many text objects.
features:
- fast text and color changes
- multiline support
- horizontal and vertical text aligning
- Java2D font support
Thanks to Terje Wiesener ( who wrote the other Text2D implementation ), i borrowed the render stuff from his work :)
Usage:
usage should be fairly simple:
just create a Text2D object and put it somewhere into your scenegraph
for more information see the Text2D class javadoc ... i believe the method names and javadoc is easy to understand
Changelog:
1.1f: third version of DTX
- removed the need to call update() every once in a while. update is now called automaticly as a preRender step
- important: changed the initial orientation and size of the text giving the ability to easily add it to a parallel view for gui purposes ... as a result from this everybody who uses DTX has to check and change his text size and orientation ... sorry
- created a simple test and a funky demo to demonstrate DTX
- created this javadoc package info file
1.0f: second version of DTX ... full funcionality reached ... committed
Author: Florian Hofmann
Toolkit Dependancies: None
Demo(s):org.xith3d.test.Xith3DText2DTest & org.xith3d.test.Xith3DText2DDemo