HI Philip,

On Thu, May 21, 2009 at 9:44 AM, Philip Lamb <[email protected]> wrote:
> Thanks for the help. However, I'm not sure how I go about locating which
> nodes have AnimationPathCallback attached in the nodevisitor. I think I
> understand that usually in a nodevisitor, one can just overload the accept()
> method with the node type one is interested in, but in this case the
> callbacks are attached to MatrixTransformation nodes; how to I identify
> whether a MatrixTransform has an attached AnimationPathCallback?
>
> If there's a piece of sample code which shows a method, I'd be happy just to
> be pointed to that.

In the NodeiVisitor simply do:

void apply(osg::Transform& tranform)
{
     osg::AnimationPathCallback* apc =
dynamic_cast<osg::AnimationPathCallback*>(transform.getUpdateCallback());
    if (apc)
   {
        // do your stuff...
   }
}
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to