From 066c272f7a72c729c9b93bd2e3c84990a993db3f Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Fri, 15 Mar 2019 21:29:13 +0300 Subject: [PATCH] Override default behavior for linear vector interpolations --- include/osgParticle/LinearInterpolator | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/osgParticle/LinearInterpolator b/include/osgParticle/LinearInterpolator index c44e26356..46c603874 100644 --- a/include/osgParticle/LinearInterpolator +++ b/include/osgParticle/LinearInterpolator @@ -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() {} };