Override default behavior for linear vector interpolations

This commit is contained in:
Capostrophic 2019-03-15 21:29:13 +03:00 committed by Robert Osfield
parent d3174bd36c
commit de64d58e06

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() {}
};