Hi Ragnar,

On 7/10/09 10:48 AM, Ragnar Hammarqvist wrote:
I'm using a visitor to obtain all Statsets in a graph. But the visitor dose not 
collects all statsets, why?

Code im using is simply this:
...
void apply(osg::Node&n)
{
        if(n.getStateSet())
        {
                m_Statsets.insert(n.getStateSet());
        }
        traverse(n);
};

You're only collecting StateSets attached to nodes, but they can also be attached to Drawables, so you need to handle Geodes separately (iterating over all drawables).

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

Reply via email to