[osg-users] Insersector doesn't take into account DrawableCullCallback result

Robert Osfield robert.osfield at gmail.com
Mon Oct 17 04:40:16 PDT 2016


Hi Davide,

The Intersectors don't have specific handling of drawable callbacks so
I don't think it'll be possible to do it how you want.

Personally I wouldn't use DrawableCullCalbacks to toggle on/off
drawables from rendering.  I'd either use a osg::Switch or a NodeMask
that decorates the subgraph that you want to toggle on/on.  The
NodeMask is pretty light weight and with OSG-3.4 onwards will work
with Drawable too, so this is what I'd use.

Another advantage of using NodeMask is because it's a built in feature
rather than use customization it will work with built in features.
You can also use traversal mask in combination with node masks if you
want.

Robert.

On 17 October 2016 at 12:34, Davide Raccagni <davide.raccagni at gmail.com> wrote:
> Hello,
> I need to define a specific DrawableCullCallback for each Geometry to
> hide/show them by using a layer approach like in AutoCAD. I've noticed that
> LinearIntersector and PolytopeIntersector don't skip drawable with a
> DrawableCullCallback assigned that returns true. Is there a way for the
> methods above to take the DrawableCullCallback result into account?
>
> Thanks in advance.
> Davide Raccagni
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



More information about the osg-users mailing list