From Terry Welsh, "I was having a small culling problem with osgText... new TextBase.cpp that fixes it."

This commit is contained in:
Robert Osfield 2011-05-30 08:24:34 +00:00
parent 40fd093fb1
commit 60eaa68122

View File

@ -297,6 +297,7 @@ osg::BoundingBox TextBase::computeBound() const
{ {
osg::Matrix matrix; osg::Matrix matrix;
matrix.makeTranslate(_position); matrix.makeTranslate(_position);
matrix.preMultRotate(_rotation);
bbox.expandBy(osg::Vec3(_textBB.xMin(),_textBB.yMin(),_textBB.zMin())*matrix); bbox.expandBy(osg::Vec3(_textBB.xMin(),_textBB.yMin(),_textBB.zMin())*matrix);
bbox.expandBy(osg::Vec3(_textBB.xMax(),_textBB.yMax(),_textBB.zMax())*matrix); bbox.expandBy(osg::Vec3(_textBB.xMax(),_textBB.yMax(),_textBB.zMax())*matrix);
} }