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.racca...@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@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to