mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-25 15:11:33 +00:00
Eliminate dynamic_cast in BillboardCallback
This commit is contained in:
parent
60a12b3dee
commit
82b792f808
1 changed files with 19 additions and 23 deletions
|
@ -132,9 +132,8 @@ namespace
|
||||||
|
|
||||||
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
||||||
{
|
{
|
||||||
osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(nv);
|
osgUtil::CullVisitor* cv = static_cast<osgUtil::CullVisitor*>(nv);
|
||||||
if (node && cv)
|
|
||||||
{
|
|
||||||
osg::Matrix modelView = *cv->getModelViewMatrix();
|
osg::Matrix modelView = *cv->getModelViewMatrix();
|
||||||
|
|
||||||
// attempt to preserve scale
|
// attempt to preserve scale
|
||||||
|
@ -155,9 +154,6 @@ namespace
|
||||||
|
|
||||||
cv->popModelViewMatrix();
|
cv->popModelViewMatrix();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
traverse(node, nv);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct UpdateMorphGeometry : public osg::Drawable::CullCallback
|
struct UpdateMorphGeometry : public osg::Drawable::CullCallback
|
||||||
|
|
Loading…
Reference in a new issue