Hi Simon,
As far as I can tell, the definition of class Interpolator is missing a call of
the META_Object macro. The Object class declares additional abstract methods
that you need to override too.
This is against osg-3.0.1 vc9.
Could you try the following:
#include < osgParticle/Interpolator >
// Derp = Decelerate Interpolation
// Lerp = Linear Interpolation
class Derp : public osgParticle::Interpolator
{
public:
Derp() : osgParticle::Interpolator() {}
Derp(const Interpolator& copy, const osg::CopyOp& copyop =
osg::CopyOp::SHALLOW_COPY)
: osgParticle::Interpolator(copy, copyop) {}
~Derp() { }
META_Object(test,Derp)
float Lerp(float t, float y1, float y2) const
{
float temp = y2 - y1;
temp *= t;
return y1 + temp;
}
virtual float interpolate(float t, float y1, float y2) const
{
float temp = 1-t;
temp = temp * temp;
return Lerp(1-temp, y1, y2);
}
};
int main()
{
Derp * derp = new Derp();
return 0;
}
Cheers,
-Tony
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=42764#42764
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org