[osg-users] Is it possible to cull/visit based on the negative result instead of the positive one?

michael kapelko kornerr at gmail.com
Mon Jun 15 03:24:24 PDT 2015


Hi.
I'm implementing node picking.

As I understood, the usual approach is:
1) go through all nodes and set their node masks to some custom value like
0x1
2) set pickable/selectable node masks to some custom value like 0x2
3) set osgUtil::IntersectionVisitor's traversal mask to 0x2
4) IntersectionVisitor visits only those nodes that have 0x2 mask

I think the following approach is easier:
1) set pickable/selectable node masks to some custom value like
current_node_mask MINUS 0x2
2) set IntersectionVisitor's traversal mask to default_node_mask MINUS 0x2
3) IntersectionVisitor visits only those nodes that have 0x2 mask EXCLUDED

Am I correct with my assumption? Can OSG do that? Or why doesn't it do that?
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150615/a5d7671f/attachment-0002.htm>


More information about the osg-users mailing list