Hi Catalin,

On Thu, 18 Apr 2019 at 00:42, Catalin Flower <inbox....@gmail.com> wrote:
> I was looking of a solution that depends on camera. Because only the 
> view/camera knows which object is hidden. The TraversalMask will do the trick 
> then. I see also a CullMask, guess this is not good and it will not help with 
> the picking issue.

The View::computeIntersections(..) method allows you to pass in the
TraversalMask to use, it's 0xffffffff by default.

> My understanding the mask is a 32 bit value, this means I can only have a 
> maximum 32 types of nodes to be shown/hidden because an AND operation is 
> performed?

Yes.  Typically one would have broad catagories of nodes that you want
to interact with in different ways.  If you need more than 32
categories then you'll need to use custom callback or node inserted in
the scene graph in combination to state attached to the visitor to
decide whether a subgraph should be traversed or not.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to