Commit Graph

11 Commits

Author SHA1 Message Date
Robert Osfield
915b38dc25 Added deprecated notices. 2010-09-22 09:50:07 +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
fd1493e14b Added support for controlling the number of curves samples to generate on Glyph3D's. Set via Font3D::setNumberCurveSamples(num). 2010-08-25 11:06:10 +00:00
Robert Osfield
777763bc55 Added raw primitive and vertex data into the osgText::Font3D and FreeTypePlugin to aid development of new 3D text functionality.
Added new test for original 3D text support and new experimental code for exploring approaches to new 3D text support.
2010-07-14 18:50:41 +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
e869200b3d Refactored the mutex usage in osgText and freetype plugin to prevent multi-thread crash 2008-02-25 12:54:54 +00:00
Robert Osfield
ce5388a8bc Convert osgText and freetype plugin across to keeping the font size as state that
is passed into the getGlyph and getKerning methods rather than a current state of the font itself.
2007-12-23 18:15:54 +00:00
Robert Osfield
0cdc3e9506 Added intializers. 2007-12-16 17:01:40 +00:00
Robert Osfield
256391c3b4 From Serge Lages, introduce readRef*File() methods which pass back ref_ptr<> rather than C pointers. 2007-12-12 17:04:48 +00:00
Robert Osfield
f69a48e552 From David Callu, added support of 3D text to osgText and associated plugins. 2007-12-10 15:15:56 +00:00