forked from mirror/openmw-tes3mp
Remove dynamic_cast in GeomMorpherController
This commit is contained in:
parent
94e8560bf8
commit
28b20428b9
2 changed files with 15 additions and 17 deletions
|
@ -221,9 +221,7 @@ GeomMorpherController::GeomMorpherController(const Nif::NiMorphData *data)
|
||||||
|
|
||||||
void GeomMorpherController::update(osg::NodeVisitor *nv, osg::Drawable *drawable)
|
void GeomMorpherController::update(osg::NodeVisitor *nv, osg::Drawable *drawable)
|
||||||
{
|
{
|
||||||
osgAnimation::MorphGeometry* morphGeom = dynamic_cast<osgAnimation::MorphGeometry*>(drawable);
|
osgAnimation::MorphGeometry* morphGeom = static_cast<osgAnimation::MorphGeometry*>(drawable);
|
||||||
if (morphGeom)
|
|
||||||
{
|
|
||||||
if (hasInput())
|
if (hasInput())
|
||||||
{
|
{
|
||||||
if (mKeyFrames.size() <= 1)
|
if (mKeyFrames.size() <= 1)
|
||||||
|
@ -242,7 +240,6 @@ void GeomMorpherController::update(osg::NodeVisitor *nv, osg::Drawable *drawable
|
||||||
}
|
}
|
||||||
|
|
||||||
morphGeom->transformSoftwareMethod();
|
morphGeom->transformSoftwareMethod();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UVController::UVController()
|
UVController::UVController()
|
||||||
|
|
|
@ -97,6 +97,7 @@ namespace NifOsg
|
||||||
virtual float getMaximum() const;
|
virtual float getMaximum() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// Must be set on an osgAnimation::MorphGeometry.
|
||||||
class GeomMorpherController : public osg::Drawable::UpdateCallback, public SceneUtil::Controller, public ValueInterpolator
|
class GeomMorpherController : public osg::Drawable::UpdateCallback, public SceneUtil::Controller, public ValueInterpolator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in a new issue