~ubuntu-branches/ubuntu/trusty/openscenegraph/trusty

« back to all changes in this revision

Viewing changes to OpenSceneGraph/src/osgText/TextBase.cpp

  • Committer: Package Import Robot
  • Author(s): Loic Dachary (OuoU)
  • Date: 2011-09-08 16:06:16 UTC
  • mfrom: (1.4.2 upstream)
  • Revision ID: package-import@ubuntu.com-20110908160616-jyq2q9mmrqyxh89d
Tags: 3.0.1-1
* New upstream fixes release.
* Fixed ffmpeg FTBFS (Closes: #640339).

Show diffs side-by-side

added added

removed removed

Lines of Context:
287
287
 
288
288
        if (!bbox.valid())
289
289
        {
290
 
            // provide a fallback in cases where no bounding box has been been setup so far
291
 
            if (_characterSizeMode!=OBJECT_COORDS || _autoRotateToScreen)
 
290
            // Provide a fallback in cases where no bounding box has been been setup so far.
 
291
            // Note, assume a scaling of 1.0 for _characterSizeMode!=OBJECT_COORDS as the
 
292
            // for screen space coordinates size modes we don't know what scale will be used until
 
293
            // the text is actually rendered, but we haven't to assume something otherwise the
 
294
            // text label will be culled by view or small feature culling on first frame.
 
295
            if (_autoRotateToScreen)
292
296
            {
293
 
                // default to a zero size.
294
 
                bbox.set(_position, _position);
 
297
                // use bounding sphere encompassing the maximum size of the text centered on the _position
 
298
                double radius = _textBB.radius();
 
299
                osg::Vec3 diagonal(radius, radius, radius);
 
300
                bbox.set(_position-diagonal, _position+diagonal);
295
301
            }
296
302
            else
297
303
            {