Hi,

Thank you very much for the help

I tried it by ovewriding Apply method of "Node Visitor". When I tried to 
"reset" it is not reseting. Even if set setPause(true) is not working. 

Here what i did


Code:
class VisitorN : public osg::NodeVisitor
{
VisitorN (  ) 
        {
                 setTraversalMode(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN );
                
        }
virtual void apply( osg::Transform& tranform );

};

void VisitorN::apply(  osg::Transform& transform )
{
        
        osg::AnimationPathCallback* apc = 
dynamic_cast<osg::AnimationPathCallback*>(transform.getUpdateCallback()); 
        
        if (apc)
        {
                std::cout<<"restd"<<std::endl;
                apc->reset();   
                
        } 
        else
        {
                std::cout<<"Got NO Animation Time: "<<std::endl;
        }
traverse( transform );
}



And in the main function 


Code:
if(AniTime==0)
{
FindTextureVisitor ftv(  );
MatrixTrans[0]->accept( ftv );
}

//MatrixTrans is a transformaion matrix which added a OSG model using addChild 
method.


... 


My animation is not resetting.

How to know the end of the animation? I want to stop animation once it reaches 
end.

Can you please help me what to do?

Thank you!

Cheers,
Koduri

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=48913#48913




_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to