Hi Jannik, Just catching up with this thread, but am afraid my brain isn't yet clear enough this Monday morning to be able spot anything. I'm afraid I'm still a bit foggy brained, did a 38 mile, hilly and muddy ultramarathon at the weekend :-)
For now I don't have anything else to add to your experiments. If you are still struggling after your latest experiments I'll just to my head around the issue later. Robert. On 24 October 2015 at 22:50, Jannik Heller <[email protected]> wrote: > Ok, setting on projectionCullingStack works fine for the whole subgraph, > you just have to transform the plane to view space first: > > > Code: > > virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) > { > osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(nv); > if (cv) > { > osg::CullingSet& cullingStack = > cv->getProjectionCullingStack().back(); > > osg::Polytope::PlaneList origPlaneList = > cullingStack.getFrustum().getPlaneList(); > > osg::Plane transformed = mCullPlane; > transformed.transform(cv->getCurrentCamera()->getViewMatrix()); > > cullingStack.getFrustum().add(transformed); > > traverse(node, nv); > > // undo > cullingStack.getFrustum().set(origPlaneList); > } > else > traverse(node, nv); > } > > > > It's a bit ugly, but good enough for me. Unless Robert has a better idea, > I'll stick with this approach! > > Cheers, > Jannik[/code] > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=65434#65434 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

