Override default behavior for linear vector interpolations

This commit is contained in:
Capostrophic 2019-03-15 21:29:13 +03:00
parent c89a7fe67c
commit 066c272f7a

View File

@ -42,6 +42,21 @@ namespace osgParticle
return y1 + (y2 - y1) * t;
}
virtual osg::Vec2 interpolate(float t, const osg::Vec2& y1, const osg::Vec2& y2) const
{
return y1 + (y2 - y1) * t;
}
virtual osg::Vec3 interpolate(float t, const osg::Vec3& y1, const osg::Vec3& y2) const
{
return y1 + (y2 - y1) * t;
}
virtual osg::Vec4 interpolate(float t, const osg::Vec4& y1, const osg::Vec4& y2) const
{
return y1 + (y2 - y1) * t;
}
protected:
virtual ~LinearInterpolator() {}
};