From Cedric Pinson, "Here a patch to be able to clone stateattribute, in order to do that i

moved the StateAttribute::Callback structure to a file
StateAttributeCallback with the same behavior as NodeCallback.
"
This commit is contained in:
Robert Osfield
2009-10-22 10:33:16 +00:00
parent 8efd251b10
commit 2d38e187fd
10 changed files with 51 additions and 37 deletions

View File

@@ -36,8 +36,6 @@ namespace osgAnimation
virtual int link(osgAnimation::Animation* animation) = 0;
virtual void updateLink() = 0;
virtual const std::string& getName() const = 0;
virtual ~AnimationUpdateCallbackBase() {}
};
template <class T>
@@ -130,7 +128,7 @@ namespace osgAnimation
class OSGANIMATION_EXPORT UpdateMaterial : public AnimationUpdateCallback<osg::StateAttribute::Callback>
class OSGANIMATION_EXPORT UpdateMaterial : public AnimationUpdateCallback<osg::StateAttributeCallback>
{
protected:
osg::ref_ptr<osgAnimation::Vec4Target> _diffuse;
@@ -147,6 +145,7 @@ namespace osgAnimation
void update(osg::Material& material);
bool needLink() const;
bool link(osgAnimation::Channel* channel);
osgAnimation::Vec4Target* getDiffuse();
};
}