Hi Robert,

I have a request about the new IntersectionVisitor and how it interacts with
a PagedLOD.
Currently it only traverse the highest resolution child (from
IntersectionVisitor.cpp):

void IntersectionVisitor::apply(osg:PagedLOD& plod)
{
   if (!enter(plod)) return;

   if (plod.getNumFileNames()>0)
   {
       osg::ref_ptr<osg::Node> highestResChild;

       if (plod.getNumFileNames() != plod.getNumChildren() &&
_readCallback.valid())
       {
           highestResChild = _readCallback->readNodeFile(
plod.getDatabasePath() + plod.getFileName(plod.getNumFileNames()-1) );
       }
       else if (plod.getNumChildren()>0)
       {
           highestResChild = plod.getChild( plod.getNumChildren()-1 );
       }

       if (highestResChild.valid())
       {
           highestResChild->accept(*this);
       }
   }

   leave();
}

In my app, I have a custom PagedLOD which is organised differently than the
original one. And I would like the IntersectionVisitor to directly traverse
the PagedLOD node (like the LOD node for example):

if (!enter(lod)) return;

traverse(lod);

leave();

That is why I am wondering if it is possible to add an option to the
IntersectionVisitor like setTraverseOnlyHighestPLODChild(bool). By default
it should be setted to true of course.
Or should it be better to add such an option directly to PagedLOD and make
the IntersectionVisitor check for it on each PagedLOD visited ?

-- 
Serge Lages
http://www.magrathea-engine.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to