279 | | if (_autoTransformCache[i]._traversalNumber<0 && (_characterSizeMode!=OBJECT_COORDS || _autoRotateToScreen)) |

280 | | { |

281 | | // _autoTransformCache is not valid so don't take it into accoumt when compute bounding volume. |

282 | | #if 1 |

283 | | // so fallback to estimating the bounding box size by assuming a scale of 1 |

284 | | // but might cause problems due to small feature culling... |

| 279 | if (_autoTransformCache[i]._traversalNumber>=0) |

| 280 | { |

| 281 | osg::Matrix& matrix = _autoTransformCache[i]._matrix; |

| 282 | bbox.expandBy(osg::Vec3(_textBB.xMin(),_textBB.yMin(),_textBB.zMin())*matrix); |

| 283 | bbox.expandBy(osg::Vec3(_textBB.xMax(),_textBB.yMax(),_textBB.zMax())*matrix); |

| 284 | } |

| 285 | } |

| 286 | |

| 287 | |

| 288 | if (!bbox.valid()) |

| 289 | { |

| 290 | // provide a fallback in cases where no bounding box has been been setup so far |

| 291 | if (_characterSizeMode!=OBJECT_COORDS || _autoRotateToScreen) |

| 292 | { |

| 293 | // default to a zero size. |

| 294 | bbox.set(_position, _position); |

| 295 | } |

| 296 | else |

| 297 | { |