Hi David and Sherman,

On Tue, Aug 19, 2008 at 5:28 PM, David Callu <[EMAIL PROTECTED]> wrote:
> patch is ready for submission
>
> BUG : Forgot to recompute the Position of the Text after change the
> TextBase::_autoRotateToScreen flag.
> FIX   : call osgText::TextBase::computePosition() after change
> theTextBase::_autoRotateToScreen flag.

This fix looks reasonable.

> BUG : In TextBase::computeBound(), if _autoTransformCache is not valid we
> don't take it into account
> when compute bounding volume. This result in invalid scenegraph's
> BoudingSphere  if there are only
> one osgText::Text drawable in the graph.
> FIX : Always use _autoTransformCache, even if it is invalid. Invalid mean
> AutoTransformCache::traversaleNumber == -1.
> But AutoTransformCache::_matrix is well computed and can be used to compute
> the BoundingSphere.

This fix is not OK.  The _autoTransformCache._matrix is computed from
the values of the
the _autoTransformCache._modelview in the cases of auto rotate/auto
scaled text - as
the positioning/sizing of the text is view depenant.  The _modelview
matrix is not set until
the first Text::drawImplementation(..) is called, and prior to that
it'll just by the identity matrix.

Since the _modelview matrix is not set the computePositions() can't
correctly compute the bounding box of the text, assuming that a
identity _modelview matrix will provide a reasonable setting is not a
valid assumption - which is why the computePosition() code catches
this case and doesn't attempt to set the bounding box.

I don't know what to do about this case - one can't scale the text
until one has the modelview matrix, but one doesn't have this until
one has drawn a frame.  Chicken and egg situation.  Setting any
bounding box might avoid the invalid bounding box status, but one
wouldn't actually have a valid bounding box.

Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to