Hi,
I am experiencing a very strange phenomenon when dealing with AnimationPath
callbacks. I am finding that the _animationPath variable that is stored inside
the AnimationPath becomes invalid if I create any object at all during a
callback, even a string. What I want to do is insert a new point into the
AnimationPath while the animation is running, however, if I create a new
ControlPoint or any object the animation path becomes corrupt.
Code:
class DynamicAnimationPathCallback: public osg::AnimationPathCallback
{
osg::ref_ptr<osg::Node> node;
osg::ref_ptr<osg::AnimationPath> ap;
public:
DynamicAnimationPathCallback(osg::ref_ptr<osg::AnimationPath> ap,
osg::ref_ptr<osg::Node> node);
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
{
std::string str = "string";
_animationPath.get();
AnimationPathCallback::operator()(node,nv);
}
};
Thank you!
Cheers,
Sean
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=42849#42849
Attachments:
http://forum.openscenegraph.org//files/ss_195.png
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org