[osg-users] IntersectionVisitor and PagedLOD
robert.osfield at gmail.com
Mon Sep 3 03:02:14 PDT 2007
IntersectionVisitor isn't cast in concrete so I'm open to suggestions.
I don't really know the motivation as I don't know about your the
particulars of your app. I am a bit concerned about bloating
IntersectionVisitor with lots of specific usage case tweaks though. I
don't know if it would be possible you to solve your problem another
way. Feel free to make changes to IntersectionVisitor and submit them
for review - at least then I'd be able to mull over how intrusive the
changes might be.
On 9/3/07, Serge Lages <serge.lages at gmail.com> wrote:
> 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
> 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() &&
> highestResChild = _readCallback->readNodeFile(
> plod.getDatabasePath() + plod.getFileName(plod.getNumFileNames()-1) );
> else if (plod.getNumChildren()>0)
> highestResChild = plod.getChild( plod.getNumChildren()-1 );
> if (highestResChild.valid())
> 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;
> 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
> osg-users mailing list
> osg-users at lists.openscenegraph.org
More information about the osg-users