Commit Graph

14 Commits

Author SHA1 Message Date
Robert Osfield
4174d72a52 2014-05-14 10:19:43 +00:00
Robert Osfield
215fca84f7 Enabled the settng/getting of the Text3D's WallStateSet and BackStateSet along with use of these in the rendering implementation
to allow separate colour and other state to be assigned to the front, wall and back faces.
2011-03-07 12:33:11 +00:00
Robert Osfield
dab1c79127 Moved handling of character aspect ratio into osgText::Style. 2010-09-29 12:45:35 +00:00
Robert Osfield
b40acacf53 Moved set/getFont from Text/Text3D into TextBase 2010-09-29 11:34:55 +00:00
Robert Osfield
5af4884558 Moved Text3D across to using Style for character thickness.
Quitened down debug messages in 3D text geometry creation.
Improved the Text3D implementation of the new 3D text geometry.
2010-09-27 17:11:12 +00:00
Robert Osfield
f8b44c3b33 Added support for osgText::Style into osgText::Text3D.
Refactored Text3D implementation to use new GlyphGeometry class.
Implemented GlyphGeometry backend and cleaned up Glyph3D interface.
2010-09-27 16:18:20 +00:00
Robert Osfield
a6abbb545e Further work on new 3D text support 2010-09-06 15:43:59 +00:00
Robert Osfield
ba10f56f86 Refactored to use a typedef of Font to Font3D rather than have a separate Font3D class 2010-09-03 09:08:19 +00:00
Robert Osfield
8c3e3055e7 Refactored osgText::Font so that it now supports both 2D and 3D glyphs.
Added TextNode.h and TextNode.cpp to examples/osgtext3D in prep for introducing the new node to osgText library
2010-09-03 08:26:46 +00:00
Robert Osfield
9643c15346 From David Callu, "Problem:
osgText::Text and osgText::Text3D use the same font file.
     The first really load the file and obtain an osgText::Font object,
     the second use the cache created during the first load of the
     font file, and so obtain an osgText::Font object instead of
     osgText::Font3D object. To obtain an osgText::Font3D object,
     osgText::Text3D call osgDB::readObjectFile(...) with an option
     to specify the plugin we want an osgText::Font3D instead of
     osgText::Font.

Generalised Problem:
    In osgDB::Registry, loaded file cache is referenced by the name
    of this file, so if I load a file with some options, and the cache
    already contain object for this filename, I obtain an object
    potentially not loaded with my options.

Behaviours:
    Cache management is delegate to osgDB::Registry, but cache
    coherence (load a file with option then reuse it, deactivate the
    cache when load a specific file or don't cached the loaded file)
    is user's responsibility.

Text3D solution:
    Postfix the font file name by .text3d or something similar and then have the freetype plugin return
    osgText::Font3D when it detects this.
    This operation is done by osgText::readFont3DFile() which unsure the filename have .text3d as extension.
    This is totaly transparent for user, and backward compatible.


BTW, I fix the bug about the Normal of 3D text. Currently, the front and wall face have
the same normal (0,0,1) in the Text3D object coordinate. Now the wall face have its own
normal array computed by the plugin.

BTW 2, I implement
- void Text3D::accept(osg::Drawable::ConstAttributeFunctor& af) const
- void Text3D::accept(osg::PrimitiveFunctor& pf) const
so now statistics are well reported.
"
2009-03-10 10:56:00 +00:00
Robert Osfield
7dc3ad4b5e From David Callu, "fixed bounding box bug" 2008-06-18 10:46:05 +00:00
Robert Osfield
01c284429b From Paul Melis, "Here's an updated include/osgText/Text3D that forces recomputation of the glyph repr when the character depth is updated, also when the rendering mode is set.
This caused a Text3D object read from a .osg file to not have the correct depth."
2008-06-06 16:25:14 +00:00
Robert Osfield
213a370c25 Added new setFont(ref_ptr<>) variants to Text and Text3D 2007-12-12 17:48:20 +00:00
Robert Osfield
eef88e7e83 From David Callu, Text3D 2007-12-10 19:49:17 +00:00