SearchTraverser cst;
cst
to look for all Nodes of type LightSource , do the following: cst.setBaseClassSearch( true ); cst.setClassName("class nvsg::LightSource");
apply
of the Traverser. Depending on the type of Traverser, it might be OK to omit the ViewState argument. cst.apply( NULL, &scene );
const vector<const Object *> & searchResults = cst.getResults();
A RenderTraverser like the GLTraverser is even easier to use:
RenderTraverser * rt = new GLTraverser;
rt->apply( &viewState, &scene );