예제 #1
0
void Widget::traverse(osg::NodeVisitor& nv)
{
    if (nv.referenceCount()!=0)
    {
        osg::Parameters inputParameters, outputParameters;
        inputParameters.push_back(&nv);
        if (runCallbacks("traverse",inputParameters, outputParameters)) return;
    }

    traverseImplementation(nv);

}
예제 #2
0
void Widget::traverse(osg::NodeVisitor& nv)
{
    osg::CallbackObject* co = osg::getCallbackObject(this, "traverse");
    if (co)
    {
        // currently lua scripting takes a ref count so messes up handling of NodeVisitor's created on stack,
        // so don't attempt to call the sctipt.
        if (nv.referenceCount()==0)
        {
            traverseImplementation(nv);
            return;
        }

        osg::Parameters inputParameters, outputParameters;
        inputParameters.push_back(&nv);
        co->run(this, inputParameters, outputParameters);
    }
    else
    {
        traverseImplementation(nv);
    }
}